diff options
author | Matias Elo <matias.elo@nokia.com> | 2020-11-05 09:47:24 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2020-11-05 17:22:01 +0200 |
commit | 5630c77d44745ca47843d3b562fa30129621ffaf (patch) | |
tree | 11e8ef80e7a0eda610365a94e85bdf96e01fde4e /platform/linux-dpdk/test | |
parent | f58a35631a3faa3e67384936c7f07caf304e5eb7 (diff) |
linux-dpdk: fix out-of-tree build
Previously, running 'make clean' in an out-of-tree build directory
incorrectly deleted wrapper-script.sh in the source directory.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reported-and-tested-by: Carl Wallen <carl.wallen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/test')
-rw-r--r-- | platform/linux-dpdk/test/Makefile.am | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/platform/linux-dpdk/test/Makefile.am b/platform/linux-dpdk/test/Makefile.am index f51859773..6e4edf952 100644 --- a/platform/linux-dpdk/test/Makefile.am +++ b/platform/linux-dpdk/test/Makefile.am @@ -6,12 +6,14 @@ SUBDIRS = if test_vald TESTS = validation/api/pktio/pktio_run.sh -SUBDIRS += validation/api/pktio +test_SCRIPTS = $(dist_check_SCRIPTS) + +SUBDIRS += validation/api/pktio \ + example else #performance tests refer to pktio_env if test_perf -SUBDIRS += validation/api/pktio \ - example +SUBDIRS += validation/api/pktio endif endif @@ -34,3 +36,23 @@ 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 |