]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/dpdk/mk/rte.sdktest.mk
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / mk / rte.sdktest.mk
CommitLineData
9f95a23c
TL
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2010-2014 Intel Corporation
7c673cae
FG
3
4ifeq (,$(wildcard $(RTE_OUTPUT)/.config))
5 $(error "need a make config first")
6else
7 include $(RTE_SDK)/mk/rte.vars.mk
8endif
9ifeq (,$(wildcard $(RTE_OUTPUT)/Makefile))
10 $(error "need a make config first")
11endif
12
13DATE := $(shell date '+%Y%m%d-%H%M')
14AUTOTEST_DIR := $(RTE_OUTPUT)/autotest-$(DATE)
15
16DIR := $(shell basename $(RTE_OUTPUT))
17
18#
19# test: launch auto-tests, very simple for now.
20#
9f95a23c
TL
21.PHONY: test test-fast test-perf test-drivers test-dump coverage
22
23PERFLIST=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
28DRIVERSLIST=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
33DUMPLIST=dump_struct_sizes,dump_mempool,dump_malloc_stats,dump_devargs,\
34 dump_log_types,dump_ring,dump_physmem,dump_memzone
35
36SPACESTR:=
37SPACESTR+=
38STRIPPED_PERFLIST=$(subst $(SPACESTR),,$(PERFLIST))
39STRIPPED_DRIVERSLIST=$(subst $(SPACESTR),,$(DRIVERSLIST))
40STRIPPED_DUMPLIST=$(subst $(SPACESTR),,$(DUMPLIST))
7c673cae 41
9f95a23c
TL
42coverage: BLACKLIST=-$(STRIPPED_PERFLIST)
43test-fast: BLACKLIST=-$(STRIPPED_PERFLIST),$(STRIPPED_DRIVERSLIST),$(STRIPPED_DUMPLIST)
44test-perf: WHITELIST=$(STRIPPED_PERFLIST)
45test-drivers: WHITELIST=$(STRIPPED_DRIVERSLIST)
46test-dump: WHITELIST=$(STRIPPED_DUMPLIST)
7c673cae 47
9f95a23c 48test test-fast test-perf test-drivers test-dump:
7c673cae
FG
49 @mkdir -p $(AUTOTEST_DIR) ; \
50 cd $(AUTOTEST_DIR) ; \
51 if [ -f $(RTE_OUTPUT)/app/test ]; then \
9f95a23c 52 python $(RTE_SDK)/app/test/autotest.py \
7c673cae
FG
53 $(RTE_OUTPUT)/app/test \
54 $(RTE_TARGET) \
55 $(BLACKLIST) $(WHITELIST); \
56 else \
9f95a23c 57 echo "No test found, please do a 'make' first, or specify O=" ; \
7c673cae
FG
58 fi
59
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
62coverage:
63 @mkdir -p $(AUTOTEST_DIR) ; \
64 cd $(AUTOTEST_DIR) ; \
65 if [ -f $(RTE_OUTPUT)/app/test ]; then \
11fdf7f2 66 python $(RTE_SDK)/test/cmdline_test/cmdline_test.py \
7c673cae
FG
67 $(RTE_OUTPUT)/app/cmdline_test; \
68 ulimit -S -n 100 ; \
9f95a23c 69 python $(RTE_SDK)/app/test/autotest.py \
7c673cae
FG
70 $(RTE_OUTPUT)/app/test \
71 $(RTE_TARGET) \
72 $(BLACKLIST) $(WHITELIST) ; \
73 $(RTE_OUTPUT)/app/dpdk-procinfo --file-prefix=ring_perf -- -m; \
74 else \
9f95a23c 75 echo "No test found, please do a 'make' first, or specify O=" ;\
7c673cae 76 fi