aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/test/Makefile.am
blob: 1f7ae611e40ce97634b8afea9a085670304e3b8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
include $(top_srcdir)/test/Makefile.inc
TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation

if WITH_OPENSSL
TESTS_ENVIRONMENT += WITH_OPENSSL=1
else
TESTS_ENVIRONMENT += WITH_OPENSSL=0
endif

SUBDIRS =

if WITH_EXAMPLES
TESTS = ipsec/ipsec_api_example.sh \
	ipsec/ipsec_crypto_example.sh

dist_check_SCRIPTS = ipsec/ipsec_api_example.sh \
		     ipsec/ipsec_crypto_example.sh
else
TESTS =
dist_check_SCRIPTS =
endif

if test_vald
TESTS += validation/api/pktio/pktio_run.sh \
	 validation/api/pktio/pktio_run_tap.sh \
	 validation/api/shmem/shmem_linux$(EXEEXT)

test_SCRIPTS = $(dist_check_SCRIPTS)

SUBDIRS += validation/api/pktio\
	  validation/api/shmem\
	  pktio_ipc \
	  example

if ODP_PKTIO_PCAP
TESTS += validation/api/pktio/pktio_run_pcap.sh
endif
if netmap_support
TESTS += validation/api/pktio/pktio_run_netmap.sh
endif
if PKTIO_DPDK
TESTS += validation/api/pktio/pktio_run_dpdk.sh
endif
TESTS += pktio_ipc/pktio_ipc_run.sh
SUBDIRS += pktio_ipc
else
#performance tests refer to pktio_env
if test_perf
SUBDIRS += validation/api/pktio
endif
endif

TEST_EXTENSIONS = .sh

TESTNAME = linux-generic

TESTENV = tests-$(TESTNAME).env

test_DATA = $(TESTENV)

DISTCLEANFILES = $(TESTENV)
.PHONY: $(TESTENV)
$(TESTENV):
	echo "TESTS=\"$(TESTS)\""    > $@
	echo "$(TESTS_ENVIRONMENT)" >> $@
	echo "$(LOG_COMPILER)"      >> $@

if test_installdir
installcheck-local:
	$(DESTDIR)/$(testdir)/run-test.sh $(TESTNAME)
endif

# If building out-of-tree, make check will not copy the scripts and data to the
# $(builddir) assuming that all commands are run locally. However this prevents
# running tests on a remote target using LOG_COMPILER.
# So copy all script and data files explicitly here.
all-local:
	if [ "x$(srcdir)" != "x$(builddir)" ]; then \
		for f in $(dist_check_SCRIPTS); do \
			if [ -e $(srcdir)/$$f ]; then \
				mkdir -p $(builddir)/$$(dirname $$f); \
				cp -f $(srcdir)/$$f $(builddir)/$$f; \
			fi \
		done \
	fi
clean-local:
	if [ "x$(srcdir)" != "x$(builddir)" ]; then \
		for f in $(dist_check_SCRIPTS); do \
			rm -f $(builddir)/$$f; \
		done \
	fi

.NOTPARALLEL: