From 28ed63b707919734d230cb13bff7d231dfeee8fc Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 12 Jun 2020 13:11:17 +0200 Subject: [PATCH] test: use generic python reference rather than python2 --- test/bidi.t | 2 +- test/helper.t | 2 +- test/hg-git.t | 6 +++--- test/main.t | 2 +- tools/check-versions | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/bidi.t b/test/bidi.t index 5f80d09..643a908 100755 --- a/test/bidi.t +++ b/test/bidi.t @@ -17,7 +17,7 @@ then test_done fi -if ! python2 -c 'import mercurial' > /dev/null 2>&1 +if ! python -c 'import mercurial' > /dev/null 2>&1 then skip_all='skipping remote-hg tests; mercurial not available' test_done diff --git a/test/helper.t b/test/helper.t index 73cbd1f..7f13c93 100755 --- a/test/helper.t +++ b/test/helper.t @@ -17,7 +17,7 @@ then test_done fi -if ! python2 -c 'import mercurial' > /dev/null 2>&1 +if ! python -c 'import mercurial' > /dev/null 2>&1 then skip_all='skipping remote-hg tests; mercurial not available' test_done diff --git a/test/hg-git.t b/test/hg-git.t index ecc5994..ee1b868 100755 --- a/test/hg-git.t +++ b/test/hg-git.t @@ -17,16 +17,16 @@ then test_done fi -if ! python2 -c 'import mercurial' > /dev/null 2>&1 +if ! python -c 'import mercurial' > /dev/null 2>&1 then skip_all='skipping remote-hg tests; mercurial not available' test_done fi -if python2 -c 'import hggit' > /dev/null 2>&1 +if python -c 'import hggit' > /dev/null 2>&1 then hggit=hggit -elif python2 -c 'import hgext.git' > /dev/null 2>&1 +elif python -c 'import hgext.git' > /dev/null 2>&1 then hggit=hgext.git else diff --git a/test/main.t b/test/main.t index 34045ce..54d50a0 100755 --- a/test/main.t +++ b/test/main.t @@ -26,7 +26,7 @@ then test_done fi -if ! python2 -c 'import mercurial' > /dev/null 2>&1 +if ! python -c 'import mercurial' > /dev/null 2>&1 then skip_all='skipping remote-hg tests; mercurial not available' test_done diff --git a/tools/check-versions b/tools/check-versions index 95b891b..f7dfeac 100755 --- a/tools/check-versions +++ b/tools/check-versions @@ -102,7 +102,7 @@ class Component def build Dir.chdir(dir) do targets = %w[build_py build_ext].map { |e| [e, '--build-lib', "#{$builddir}/python"] } - run_cmd %w[python2 setup.py --quiet] + targets.flatten + run_cmd %w[python setup.py --quiet] + targets.flatten end end