tests: cosmetic changes in t/extra-sources.sh
[platform/upstream/automake.git] / t / python-too-old.sh
old mode 100755 (executable)
new mode 100644 (file)
index e4185fc..0042799
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 
 am_create_testdir=empty
 required=python
-. ./defs || exit 1
+. test-init.sh
 
 py_too_old ()
 {
@@ -34,7 +34,8 @@ py_too_old ()
   grep '[Pp]ython interpreter is too old' stderr
 }
 
-PYTHON=; unset PYTHON
+saved_PYTHON=$PYTHON; export saved_PYTHON
+unset PYTHON
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -50,7 +51,7 @@ py_too_old python
 mkdir bin
 cat > bin/my-python << 'END'
 #! /bin/sh
-exec python ${1+"$@"}
+exec $saved_PYTHON ${1+"$@"}
 END
 chmod a+x bin/my-python
 PATH=$(pwd)/bin$PATH_SEPARATOR$PATH