tests: use $PYTHON in #! so we always use the right Python
authorAugie Fackler <augie@google.com>
Thu, 15 Jun 2017 14:27:52 -0400
changeset 32938 b6776b34e44e
parent 32937 7fe1f9785c75
child 32939 cad62cb3c84c
tests: use $PYTHON in #! so we always use the right Python
tests/test-bisect.t
tests/test-extdiff.t
tests/test-extension.t
tests/test-highlight.t
tests/test-largefiles-cache.t
tests/test-largefiles.t
tests/test-merge-symlinks.t
tests/test-newcgi.t
tests/test-newercgi.t
tests/test-oldcgi.t
--- a/tests/test-bisect.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-bisect.t	Thu Jun 15 14:27:52 2017 -0400
@@ -453,7 +453,7 @@
 test bisecting command
 
   $ cat > script.py <<EOF
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > import sys
   > from mercurial import ui, hg
   > repo = hg.repository(ui.ui.load(), '.')
--- a/tests/test-extdiff.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-extdiff.t	Thu Jun 15 14:27:52 2017 -0400
@@ -249,7 +249,7 @@
 Prepare custom diff/edit tool:
 
   $ cat > 'diff tool.py' << EOT
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > import time
   > time.sleep(1) # avoid unchanged-timestamp problems
   > file('a/a', 'ab').write('edited\n')
--- a/tests/test-extension.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-extension.t	Thu Jun 15 14:27:52 2017 -0400
@@ -98,7 +98,7 @@
 Check hgweb's load order:
 
   $ cat > hgweb.cgi <<EOF
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > from mercurial import demandimport; demandimport.enable()
   > from mercurial.hgweb import hgweb
   > from mercurial.hgweb import wsgicgi
--- a/tests/test-highlight.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-highlight.t	Thu Jun 15 14:27:52 2017 -0400
@@ -956,7 +956,7 @@
   > EOF
 
   $ cat > unknownfile << EOF
-  > #!/usr/bin/python
+  > #!$PYTHON
   > def foo():
   >    pass
   > EOF
--- a/tests/test-largefiles-cache.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-largefiles-cache.t	Thu Jun 15 14:27:52 2017 -0400
@@ -93,7 +93,7 @@
 Portable way to print file permissions:
 
   $ cat > ls-l.py <<EOF
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > import sys, os
   > path = sys.argv[1]
   > print '%03o' % (os.lstat(path).st_mode & 0777)
--- a/tests/test-largefiles.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-largefiles.t	Thu Jun 15 14:27:52 2017 -0400
@@ -215,7 +215,7 @@
 Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
 
   $ cat <<EOF > "$TESTTMP/hgweb.cgi"
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > from mercurial import demandimport; demandimport.enable()
   > from mercurial.hgweb import hgweb
   > from mercurial.hgweb import wsgicgi
--- a/tests/test-merge-symlinks.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-merge-symlinks.t	Thu Jun 15 14:27:52 2017 -0400
@@ -1,5 +1,5 @@
   $ cat > echo.py <<EOF
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > import os, sys
   > try:
   >     import msvcrt
--- a/tests/test-newcgi.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-newcgi.t	Thu Jun 15 14:27:52 2017 -0400
@@ -5,7 +5,7 @@
 
   $ hg init test
   $ cat >hgweb.cgi <<HGWEB
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > #
   > # An example CGI script to use hgweb, edit as necessary
   > 
@@ -31,7 +31,7 @@
   > HGWEBDIRCONF
 
   $ cat >hgwebdir.cgi <<HGWEBDIR
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > #
   > # An example CGI script to export multiple hgweb repos, edit as necessary
   > 
--- a/tests/test-newercgi.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-newercgi.t	Thu Jun 15 14:27:52 2017 -0400
@@ -5,7 +5,7 @@
   $ hg init test
 
   $ cat >hgweb.cgi <<HGWEB
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > #
   > # An example CGI script to use hgweb, edit as necessary
   > 
@@ -28,7 +28,7 @@
   > HGWEBDIRCONF
 
   $ cat >hgwebdir.cgi <<HGWEBDIR
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > #
   > # An example CGI script to export multiple hgweb repos, edit as necessary
   > 
--- a/tests/test-oldcgi.t	Tue Jun 20 09:33:19 2017 -0400
+++ b/tests/test-oldcgi.t	Thu Jun 15 14:27:52 2017 -0400
@@ -4,7 +4,7 @@
 
   $ hg init test
   $ cat >hgweb.cgi <<HGWEB
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > #
   > # An example CGI script to use hgweb, edit as necessary
   > 
@@ -26,7 +26,7 @@
   > HGWEBDIRCONF
 
   $ cat >hgwebdir.cgi <<HGWEBDIR
-  > #!/usr/bin/env python
+  > #!$PYTHON
   > #
   > # An example CGI script to export multiple hgweb repos, edit as necessary
   >