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-fast test-perf test-drivers test-dump coverage
23 PERFLIST=ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf,\
24 reciprocal_division,reciprocal_division_perf,lpm_perf,red_all,\
25 barrier,hash_multiwriter,timer_racecond,efd,hash_functions,\
26 eventdev_selftest_sw,member_perf,efd_perf,lpm6_perf,red_perf,\
27 distributor_perf,ring_pmd_perf,pmd_perf,ring_perf
28 DRIVERSLIST=link_bonding,link_bonding_mode4,link_bonding_rssconf,\
29 cryptodev_sw_mrvl,cryptodev_dpaa2_sec,cryptodev_dpaa_sec,\
30 cryptodev_qat,cryptodev_aesni_mb,cryptodev_openssl,\
31 cryptodev_scheduler,cryptodev_aesni_gcm,cryptodev_null,\
32 cryptodev_sw_snow3g,cryptodev_sw_kasumi,cryptodev_sw_zuc
33 DUMPLIST=dump_struct_sizes,dump_mempool,dump_malloc_stats,dump_devargs,\
34 dump_log_types,dump_ring,dump_physmem,dump_memzone
38 STRIPPED_PERFLIST=$(subst $(SPACESTR),,$(PERFLIST))
39 STRIPPED_DRIVERSLIST=$(subst $(SPACESTR),,$(DRIVERSLIST))
40 STRIPPED_DUMPLIST=$(subst $(SPACESTR),,$(DUMPLIST))
42 coverage: BLACKLIST=-$(STRIPPED_PERFLIST)
43 test-fast: BLACKLIST=-$(STRIPPED_PERFLIST),$(STRIPPED_DRIVERSLIST),$(STRIPPED_DUMPLIST)
44 test-perf: WHITELIST=$(STRIPPED_PERFLIST)
45 test-drivers: WHITELIST=$(STRIPPED_DRIVERSLIST)
46 test-dump: WHITELIST=$(STRIPPED_DUMPLIST)
48 test test-fast test-perf test-drivers test-dump:
49 @mkdir -p $(AUTOTEST_DIR) ; \
50 cd $(AUTOTEST_DIR) ; \
51 if [ -f $(RTE_OUTPUT)/app/test ]; then \
52 python $(RTE_SDK)/test/test/autotest.py \
53 $(RTE_OUTPUT)/app/test \
55 $(BLACKLIST) $(WHITELIST); \
57 echo "No test found, please do a 'make test-build' first, or specify O=" ; \
60 # this is a special target to ease the pain of running coverage tests
61 # this runs all the autotests, cmdline_test script and dpdk-procinfo
63 @mkdir -p $(AUTOTEST_DIR) ; \
64 cd $(AUTOTEST_DIR) ; \
65 if [ -f $(RTE_OUTPUT)/app/test ]; then \
66 python $(RTE_SDK)/test/cmdline_test/cmdline_test.py \
67 $(RTE_OUTPUT)/app/cmdline_test; \
69 python $(RTE_SDK)/test/test/autotest.py \
70 $(RTE_OUTPUT)/app/test \
72 $(BLACKLIST) $(WHITELIST) ; \
73 $(RTE_OUTPUT)/app/dpdk-procinfo --file-prefix=ring_perf -- -m; \
75 echo "No test found, please do a 'make test-build' first, or specify O=" ;\