1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
4 ifeq (,$(wildcard $(RTE_OUTPUT)/.config))
5 $(error "need a make config first")
7 include $(RTE_SDK)/mk/rte.vars.mk
9 ifeq (,$(wildcard $(RTE_OUTPUT)/Makefile))
10 $(error "need a make config first")
13 DATE := $(shell date '+%Y%m%d-%H%M')
14 AUTOTEST_DIR := $(RTE_OUTPUT)/autotest-$(DATE)
16 DIR := $(shell basename $(RTE_OUTPUT))
19 # test: launch auto-tests, very simple for now.
21 .PHONY: test test-basic test-fast test-perf coverage
23 PERFLIST=ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf
24 coverage: BLACKLIST=-$(PERFLIST)
25 test-fast: BLACKLIST=-$(PERFLIST)
26 test-perf: WHITELIST=$(PERFLIST)
28 test test-basic test-fast test-perf:
29 @mkdir -p $(AUTOTEST_DIR) ; \
30 cd $(AUTOTEST_DIR) ; \
31 if [ -f $(RTE_OUTPUT)/app/test ]; then \
32 python $(RTE_SDK)/test/test/autotest.py \
33 $(RTE_OUTPUT)/app/test \
35 $(BLACKLIST) $(WHITELIST); \
37 echo "No test found, please do a 'make test-build' first, or specify O=" ; \
40 # this is a special target to ease the pain of running coverage tests
41 # this runs all the autotests, cmdline_test script and dpdk-procinfo
43 @mkdir -p $(AUTOTEST_DIR) ; \
44 cd $(AUTOTEST_DIR) ; \
45 if [ -f $(RTE_OUTPUT)/app/test ]; then \
46 python $(RTE_SDK)/test/cmdline_test/cmdline_test.py \
47 $(RTE_OUTPUT)/app/cmdline_test; \
49 python $(RTE_SDK)/test/test/autotest.py \
50 $(RTE_OUTPUT)/app/test \
52 $(BLACKLIST) $(WHITELIST) ; \
53 $(RTE_OUTPUT)/app/dpdk-procinfo --file-prefix=ring_perf -- -m; \
55 echo "No test found, please do a 'make test-build' first, or specify O=" ;\