[pacman-dev] [PATCH 2/2] Use the 'configure'd PYTHON to run pactest.

Jeremy Heiner scalaprotractor at gmail.com
Thu Dec 19 15:31:00 EST 2013


Instead of the one hard-coded (with '#!') in pactest.py. Remove the
'#!', chmod -x, and comment to discourage well-intentioned reversion.
Update README. Remove useless '#!' from non-main .py files.

Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com>
---
 Makefile.am            | 2 +-
 test/pacman/README     | 4 ++--
 test/pacman/pactest.py | 2 +-
 test/pacman/pmdb.py    | 1 -
 test/pacman/pmenv.py   | 1 -
 test/pacman/pmfile.py  | 1 -
 test/pacman/pmpkg.py   | 1 -
 test/pacman/pmrule.py  | 1 -
 test/pacman/pmtest.py  | 1 -
 test/pacman/util.py    | 1 -
 10 files changed, 4 insertions(+), 11 deletions(-)
 mode change 100755 => 100644 test/pacman/pactest.py

diff --git a/Makefile.am b/Makefile.am
index 6396d23..6620fbf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,7 +41,7 @@ LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
 								 $(top_srcdir)/build-aux/tap-driver.sh
 PY_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
 								 $(top_srcdir)/build-aux/tap-driver.sh
-PY_LOG_COMPILER = $(top_srcdir)/test/pacman/pactest.py
+PY_LOG_COMPILER = $(PYTHON) $(top_srcdir)/test/pacman/pactest.py
 AM_PY_LOG_FLAGS = \
 		--scriptlet-shell $(SCRIPTLET_SHELL) \
 		--ldconfig $(LDCONFIG) \
diff --git a/test/pacman/README b/test/pacman/README
index c7aeb10..f111cd6 100644
--- a/test/pacman/README
+++ b/test/pacman/README
@@ -55,12 +55,12 @@ Usage
 pactest will run the suite of test files passed as arguments.
 
 Example:
-	./pactest.py tests/*.py
+	python2.7 pactest.py tests/*.py
 
 This example will run all tests from the "tests" directory.
 
 Use the "help" option to get the full list of parameters:
-	./pactest.py --help
+	python2.7 pactest.py --help
 
 The following pieces of software are required to run the pactest suite:
 
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py
old mode 100755
new mode 100644
index e21cde7..46aa913
--- a/test/pacman/pactest.py
+++ b/test/pacman/pactest.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python2
+# (no '#!' here because configure picks PYTHON)
 #
 #  pactest : run automated testing on the pacman binary
 #
diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py
index 53de91e..61be95f 100644
--- a/test/pacman/pmdb.py
+++ b/test/pacman/pmdb.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python2
 #
 #  Copyright (c) 2006 by Aurelien Foret <orelien at chez.com>
 #  Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
diff --git a/test/pacman/pmenv.py b/test/pacman/pmenv.py
index f358285..e375ba0 100644
--- a/test/pacman/pmenv.py
+++ b/test/pacman/pmenv.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python2
 #
 #  Copyright (c) 2006 by Aurelien Foret <orelien at chez.com>
 #  Copyright (c) 2006-2013 Pacman Developmet Team <pacman-dev at archlinux.org>
diff --git a/test/pacman/pmfile.py b/test/pacman/pmfile.py
index 49c0274..4d5d210 100644
--- a/test/pacman/pmfile.py
+++ b/test/pacman/pmfile.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python2
 #
 #  Copyright (c) 2006 by Aurelien Foret <orelien at chez.com>
 #  Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 6f7ae6e..5025f38 100644
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python2
 #
 #  Copyright (c) 2006 by Aurelien Foret <orelien at chez.com>
 #  Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py
index cfcbb6b..38060eb 100644
--- a/test/pacman/pmrule.py
+++ b/test/pacman/pmrule.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python2
 #
 #  Copyright (c) 2006 by Aurelien Foret <orelien at chez.com>
 #  Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index a1f3645d..b201db4 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python2
 #
 #  Copyright (c) 2006 by Aurelien Foret <orelien at chez.com>
 #  Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
diff --git a/test/pacman/util.py b/test/pacman/util.py
index ab5a6f4..f79c4bd 100644
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python2
 #
 #  Copyright (c) 2006 by Aurelien Foret <orelien at chez.com>
 #  Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
-- 
1.8.5.2



More information about the pacman-dev mailing list