]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2413] make check fails to run tests with automake >= 1.13
authorLinux Karlsson <karlsson@ntp.org>
Fri, 28 Jun 2013 17:18:15 +0000 (13:18 -0400)
committerLinux Karlsson <karlsson@ntp.org>
Fri, 28 Jun 2013 17:18:15 +0000 (13:18 -0400)
bk: 51cdc557XxcelBTTTUK3JdE1TcU4gQ

ChangeLog
sntp/tests/Makefile.am
sntp/tests/test-driver [deleted file]
sntp/tests/tests-runner [new file with mode: 0755]

index 8a13b17651d28c02d8974afff2ebe6e5838835b1..95e629c3ab1d661256f7b5dfc8bd05d46548fc23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 2413] make check fails to run tests with automake >= 1.13
 (4.2.7p368) 2013/05/01 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 2145] ntpq dumps core when displaying sys_var_list and more.
 (4.2.7p367) 2013/04/25 Released by Harlan Stenn <stenn@ntp.org>
index 911756436e3ecd81cd70029c1b33717006c1a2ed..feb914276205650c3c2fa1aad37607ab4734bd74 100644 (file)
@@ -27,7 +27,7 @@ noinst_HEADERS =              \
        fileHandlingTest.h      \
        $(NULL)
 
-dist_check_SCRIPTS =   test-driver
+dist_check_SCRIPTS =   tests-runner
 
 EXTRA_DIST =                           \
        data/debug-input-lfp-bin        \
@@ -80,13 +80,8 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
 
 TESTS = 
 
-TEST_INPUT_DIR = $(abs_srcdir)/data
-TEST_OUTPUT_DIR = $(abs_builddir)/data
-
-TESTS_ENVIRONMENT = $(top_srcdir)/tests/test-driver $(TEST_INPUT_DIR) $(TEST_OUTPUT_DIR)
-
 if !NTP_CROSSCOMPILE
-TESTS += $(check_PROGRAMS)
+TESTS += tests-runner
 endif
 
 ## ensure ../libsntp.a is built
diff --git a/sntp/tests/test-driver b/sntp/tests/test-driver
deleted file mode 100755 (executable)
index f8adf70..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# Create the output directory.
-mkdir -p "$2"
-
-exec "$3" "$1" "$2"
diff --git a/sntp/tests/tests-runner b/sntp/tests/tests-runner
new file mode 100755 (executable)
index 0000000..412516c
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# $builddir is always .
+builddir=.
+# $srcdir will be set to the correct directory when this script is called from
+# the Makefiles generated by Automake.
+
+# Create output directory.
+mkdir -p $builddir/data
+
+# Test executable expects two arguments: test_input_dir and test_output_dir.
+./tests $srcdir/data $builddir/data
+