summaryrefslogtreecommitdiff
path: root/src/integration-tests
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-12-02 15:30:56 +0000
committerng0 <ng0@n0.is>2019-12-02 15:30:56 +0000
commitc8e5e28048dd9605f7958ef95f2a6dd626658069 (patch)
tree52375a14cc93c4161a658b4c7a1926dda11d8909 /src/integration-tests
parent53f35813d89de6f7c91883277129ffda3ca5b772 (diff)
rewrite sed logic used in Makefiles and move into dosubst awk script.
include 'bin' and its files in dist files, this is where dosubst is located. While the invocation (passing of the variables) is not optimal (yet, will be changed), this will in the end allow sharing code between Makefiles better, and maybe drop sed usage in the future.
Diffstat (limited to 'src/integration-tests')
-rw-r--r--src/integration-tests/Makefile.am20
-rw-r--r--src/integration-tests/gnunet_pyexpect.py.in2
-rw-r--r--src/integration-tests/gnunet_testing.py.in2
-rwxr-xr-xsrc/integration-tests/test_integration_bootstrap_and_connect.py.in2
-rwxr-xr-xsrc/integration-tests/test_integration_clique.py.in2
-rwxr-xr-xsrc/integration-tests/test_integration_disconnect.py.in2
-rwxr-xr-xsrc/integration-tests/test_integration_disconnect_nat.py.in2
-rwxr-xr-xsrc/integration-tests/test_integration_reconnect.py.in2
-rwxr-xr-xsrc/integration-tests/test_integration_reconnect_nat.py.in2
9 files changed, 17 insertions, 19 deletions
diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am
index 8b50def4d..f456544db 100644
--- a/src/integration-tests/Makefile.am
+++ b/src/integration-tests/Makefile.am
@@ -36,43 +36,41 @@ endif
endif
endif
-do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
-
SUFFIXES = .py.in .py
.py.in.py:
- $(do_subst) < $(srcdir)/$< > $@
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/$< > $@
chmod +x $@
gnunet_testing.py: gnunet_testing.py.in Makefile
- $(do_subst) < $(srcdir)/gnunet_testing.py.in > gnunet_testing.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/gnunet_testing.py.in > gnunet_testing.py
chmod +x gnunet_testing.py
gnunet_pyexpect.py: gnunet_pyexpect.py.in Makefile
- $(do_subst) < $(srcdir)/gnunet_pyexpect.py.in > gnunet_pyexpect.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/gnunet_pyexpect.py.in > gnunet_pyexpect.py
chmod +x gnunet_pyexpect.py
test_integration_bootstrap_and_connect.py: test_integration_bootstrap_and_connect.py.in Makefile
- $(do_subst) < $(srcdir)/test_integration_bootstrap_and_connect.py.in > test_integration_bootstrap_and_connect.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_integration_bootstrap_and_connect.py.in > test_integration_bootstrap_and_connect.py
chmod +x test_integration_bootstrap_and_connect.py
test_integration_disconnect.py: test_integration_disconnect.py.in Makefile
- $(do_subst) < $(srcdir)/test_integration_disconnect.py.in > test_integration_disconnect.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_integration_disconnect.py.in > test_integration_disconnect.py
chmod +x test_integration_disconnect.py
test_integration_disconnect_nat.py: test_integration_disconnect_nat.py.in Makefile
- $(do_subst) < $(srcdir)/test_integration_disconnect_nat.py.in > test_integration_disconnect_nat.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_integration_disconnect_nat.py.in > test_integration_disconnect_nat.py
chmod +x test_integration_disconnect_nat.py
test_integration_reconnect.py: test_integration_reconnect.py.in Makefile
- $(do_subst) < $(srcdir)/test_integration_reconnect.py.in > test_integration_reconnect.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_integration_reconnect.py.in > test_integration_reconnect.py
chmod +x test_integration_reconnect.py
test_integration_reconnect_nat.py: test_integration_reconnect_nat.py.in Makefile
- $(do_subst) < $(srcdir)/test_integration_reconnect_nat.py.in > test_integration_reconnect_nat.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_integration_reconnect_nat.py.in > test_integration_reconnect_nat.py
chmod +x test_integration_reconnect_nat.py
test_integration_clique.py: test_integration_clique.py.in Makefile
- $(do_subst) < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py
chmod +x test_integration_clique.py
diff --git a/src/integration-tests/gnunet_pyexpect.py.in b/src/integration-tests/gnunet_pyexpect.py.in
index aad84e4f7..b8ce52f00 100644
--- a/src/integration-tests/gnunet_pyexpect.py.in
+++ b/src/integration-tests/gnunet_pyexpect.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010 Christian Grothoff (and other contributing authors)
#
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in
index 10f9d4475..828f6ff42 100644
--- a/src/integration-tests/gnunet_testing.py.in
+++ b/src/integration-tests/gnunet_testing.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010, 2017, 2018 Christian Grothoff (and other contributing authors)
#
diff --git a/src/integration-tests/test_integration_bootstrap_and_connect.py.in b/src/integration-tests/test_integration_bootstrap_and_connect.py.in
index ddac326cd..441523dfe 100755
--- a/src/integration-tests/test_integration_bootstrap_and_connect.py.in
+++ b/src/integration-tests/test_integration_bootstrap_and_connect.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010, 2018 Christian Grothoff (and other contributing authors)
#
diff --git a/src/integration-tests/test_integration_clique.py.in b/src/integration-tests/test_integration_clique.py.in
index a23c025ca..65df632f0 100755
--- a/src/integration-tests/test_integration_clique.py.in
+++ b/src/integration-tests/test_integration_clique.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010, 2018 Christian Grothoff (and other contributing authors)
#
diff --git a/src/integration-tests/test_integration_disconnect.py.in b/src/integration-tests/test_integration_disconnect.py.in
index 9861728c2..c942042c4 100755
--- a/src/integration-tests/test_integration_disconnect.py.in
+++ b/src/integration-tests/test_integration_disconnect.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010, 2017 Christian Grothoff (and other contributing authors)
#
diff --git a/src/integration-tests/test_integration_disconnect_nat.py.in b/src/integration-tests/test_integration_disconnect_nat.py.in
index d3ff84ebe..2f10818cc 100755
--- a/src/integration-tests/test_integration_disconnect_nat.py.in
+++ b/src/integration-tests/test_integration_disconnect_nat.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010, 2018 Christian Grothoff (and other contributing authors)
#
diff --git a/src/integration-tests/test_integration_reconnect.py.in b/src/integration-tests/test_integration_reconnect.py.in
index 5bffb72e3..97dc94502 100755
--- a/src/integration-tests/test_integration_reconnect.py.in
+++ b/src/integration-tests/test_integration_reconnect.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010, 2017 Christian Grothoff (and other contributing authors)
#
diff --git a/src/integration-tests/test_integration_reconnect_nat.py.in b/src/integration-tests/test_integration_reconnect_nat.py.in
index 751a0484b..7624e7b38 100755
--- a/src/integration-tests/test_integration_reconnect_nat.py.in
+++ b/src/integration-tests/test_integration_reconnect_nat.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet.
# (C) 2010, 2018 Christian Grothoff (and other contributing authors)
#