aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
Diffstat (limited to 'helper')
-rw-r--r--helper/test/Makefile.am20
1 files changed, 20 insertions, 0 deletions
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index b030ddf4a..6e5229fbb 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -40,3 +40,23 @@ table_SOURCES = table.c
iplookuptable_SOURCES = iplookuptable.c
version_SOURCES = version.c
debug_SOURCES = debug.c
+
+# 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 $(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