[pacman-dev] [PATCH 2/2] Use the 'configure'd PYTHON to run pactest.
Allan McRae
allan at archlinux.org
Fri Dec 20 07:39:34 EST 2013
On 20/12/13 06:31, Jeremy Heiner wrote:
> 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>
Now, I'll actually review this patch...
> ---
> 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
Good.
> 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
Nope.
>
> 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)
Nope.
> #
> # 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
> #
Possibly... I do not think there is any reason to run this and all the
following directly. Just remove the lone "#" line and OK.
Unless someone points out why the shebang is needed here?
> # 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>
>
More information about the pacman-dev
mailing list