summaryrefslogtreecommitdiff
path: root/src/peerinfo-tool
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2010-04-30 05:35:52 +0000
committerDavid Barksdale <amatus.amongus@gmail.com>2010-04-30 05:35:52 +0000
commitb24b1e26e24f18c77035f4255dee90757b08365b (patch)
treee651fe85c06357ee0db3e5b5aceaf320c1b23184 /src/peerinfo-tool
parentefbd30b934fa773634dd2b2e18e2824795973bc7 (diff)
Move python test scripts to .py.in and sed in the correct python path.
Diffstat (limited to 'src/peerinfo-tool')
-rw-r--r--src/peerinfo-tool/Makefile.am15
-rwxr-xr-xsrc/peerinfo-tool/test_gnunet_peerinfo.py.in (renamed from src/peerinfo-tool/test_gnunet_peerinfo.py)2
2 files changed, 14 insertions, 3 deletions
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am
index 1fc088ad9..8b74efefb 100644
--- a/src/peerinfo-tool/Makefile.am
+++ b/src/peerinfo-tool/Makefile.am
@@ -20,8 +20,19 @@ gnunet_peerinfo_LDADD = \
$(top_builddir)/src/util/libgnunetutil.la
if HAVE_PYTHON_PEXPECT
-TESTS_ENVIRONMENT = $(PYTHON)
-TESTS = \
+check_SCRIPTS = \
test_gnunet_peerinfo.py
endif
+TESTS = $(check_SCRIPTS)
+
+do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
+
+test_gnunet_peerinfo.py: test_gnunet_peerinfo.py.in Makefile
+ $(do_subst) < $(srcdir)/test_gnunet_peerinfo.py.in > test_gnunet_peerinfo.py
+ chmod +x test_gnunet_peerinfo.py
+
+EXTRADIST = \
+ test_gnunet_peerinfo.py.in
+
+CLEANFILES = $(check_SCRIPTS)
diff --git a/src/peerinfo-tool/test_gnunet_peerinfo.py b/src/peerinfo-tool/test_gnunet_peerinfo.py.in
index bab59ee47..ba542f28a 100755
--- a/src/peerinfo-tool/test_gnunet_peerinfo.py
+++ b/src/peerinfo-tool/test_gnunet_peerinfo.py.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!@PYTHON@
# This file is part of GNUnet.
# (C) 2010 Christian Grothoff (and other contributing authors)
#