]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Kludge include.am to work with automake <1.12
authorNick Mathewson <nickm@torproject.org>
Fri, 24 Apr 2015 12:41:53 +0000 (08:41 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 24 Apr 2015 12:41:53 +0000 (08:41 -0400)
The SH_LOG_COMPILER feature doesn't work with older automakes, and
those are still in use in many environments we want to support
development on, like Debian Stable.

Instead, use autoconf substitution to fill out the shebang lines on
the shell scripts, and an intermediate make target to make them
executable.

This is a bugfix on the patches for #15344.  Bug not in any released
tor.

src/test/include.am
src/test/test_bt.sh.in
src/test/test_ntor.sh.in
src/test/test_zero_length_keys.sh.in

index 3c9eed886fce8de97a5fe43141438a10008774b4..c693544bd38711f1b2f8e70fa167df763726ba3e 100644 (file)
@@ -1,12 +1,24 @@
-TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
-       src/test/test_zero_length_keys.sh
+
+TESTSCRIPTS = src/test/test_zero_length_keys.sh
 
 if USEPYTHON
-TESTS += src/test/test_ntor.sh src/test/test_bt.sh
+TESTSCRIPTS += src/test/test_ntor.sh src/test/test_bt.sh
 endif
 
-TEST_EXTENSIONS = .sh
-SH_LOG_COMPILER = $(SHELL)
+TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
+       $(TESTSCRIPTS)
+
+### This is a lovely feature, but it requires automake >= 1.12, and Tor
+###  doesn't require that yet.  Below is a kludge to work around.
+###
+# TEST_EXTENSIONS = .sh
+# SH_LOG_COMPILER = $(SHELL)
+
+check-am: set-test-permissions
+
+set-test-permissions:
+       chmod 755 $(TESTSCRIPTS)
+
 
 noinst_PROGRAMS+= src/test/bench
 if UNITTESTS_ENABLED
index d2498751cb31c0630e1c2fbf75ed5aaa027f1b8d..ca8be965d4b63015cb4b01856db6b33d1da9d585 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@SHELL@
 # Test backtrace functionality.
 
 exitcode=0
index 5fea8ce31ae865b9ce530c91c2d3419d13eb9239..be35384ddfb7d1d34f95080891a6b5793b1312f4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@SHELL@
 # Validate Tor's ntor implementation.
 
 exitcode=0
index 47467baa441b778623038fc6d893eeff48b5c304..d1492d5e2048ec2021cd363f85d4615a244d215e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@SHELL@
 # Check that tor regenerates keys when key files are zero-length
 
 exitcode=0