net/ixgbe/base: update annotations
[dpdk.git] / mk / rte.sdktest.mk
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
3
4 ifeq (,$(wildcard $(RTE_OUTPUT)/.config))
5   $(error "need a make config first")
6 else
7   include $(RTE_SDK)/mk/rte.vars.mk
8 endif
9 ifeq (,$(wildcard $(RTE_OUTPUT)/Makefile))
10   $(error "need a make config first")
11 endif
12
13 DATE := $(shell date '+%Y%m%d-%H%M')
14 AUTOTEST_DIR := $(RTE_OUTPUT)/autotest-$(DATE)
15
16 DIR := $(shell basename $(RTE_OUTPUT))
17
18 #
19 # test: launch auto-tests, very simple for now.
20 #
21 .PHONY: test test-basic test-fast test-perf coverage
22
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)
27
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 \
34                         $(RTE_TARGET) \
35                         $(BLACKLIST) $(WHITELIST); \
36         else \
37                 echo "No test found, please do a 'make test-build' first, or specify O=" ; \
38         fi
39
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
42 coverage:
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; \
48                 ulimit -S -n 100 ; \
49                 python $(RTE_SDK)/test/test/autotest.py \
50                         $(RTE_OUTPUT)/app/test \
51                         $(RTE_TARGET) \
52                         $(BLACKLIST) $(WHITELIST) ; \
53                 $(RTE_OUTPUT)/app/dpdk-procinfo --file-prefix=ring_perf -- -m; \
54         else \
55                 echo "No test found, please do a 'make test-build' first, or specify O=" ;\
56         fi