On Thu, Jan 23, 2020 at 03:16:26PM +0100, SZEDER Gábor wrote: > > What's the ideal endgame wrt the tests? > Running the 'linux-clang' job with Python 2 and the 'linux-gcc' job > with Python 3 would be the simplest and cheapest, I'd think. We'd > only need to add the appropriate 'PYTHON_PATH=...' to out MAKEFLAGS. > As far as Travis CI is concerned, their Xenial image (i.e. the Linux > image we're using) comes with both 'python2' and 'python3' in PATH, at > versions v2.7 and v3.5, with the former being the default. > > Perhaps we could do the same with the OSX Clang and GCC jobs as well, > dunno. Travis CI's OSX image, too, comes with both 'python2' and > 'python3' in PATH, though Python 3 is already at v3.7, but still v2.7 > is the default. Replacing that last patch of the series with the diff below works both on Linux and macOS and both on Travis CI and Azure Pipelines. linux-clang with Python 2: https://travis-ci.org/szeder/git/jobs/640912453#L499 https://dev.azure.com/gitgitgadget/git/_build/results?buildId=27690&view=logs&j=8f20da19-31b7-5cef-4813-95b8788bd086&t=56027f08-fde3-50ad-0c9a-5ec7df432ed0&l=615 linux-gcc with Python 3: https://travis-ci.org/szeder/git/jobs/640912454#L606 https://dev.azure.com/gitgitgadget/git/_build/results?buildId=27690&view=logs&j=275f1d19-1bd8-5591-b06b-07d489ea915a&t=33e5d3ec-87e7-5f80-0281-074c6962cb44&l=652 osx-clang with Python 2: https://travis-ci.org/szeder/git/jobs/640912455#L272 https://dev.azure.com/gitgitgadget/git/_build/results?buildId=27690&view=logs&j=b80c90c8-f62d-51c1-0986-3bb8359d9b6f&t=f8b92b00-54c3-55aa-48a6-84ec793cfb94&l=365 osx-gcc with Python 3: https://travis-ci.org/szeder/git/jobs/640912456#L283 https://dev.azure.com/gitgitgadget/git/_build/results?buildId=27690&view=logs&j=cfa20e98-6997-523c-4233-f0a7302c929f&t=3de1ae02-4adb-5138-54da-65cec5dd3141&l=394 --- >8 --- diff --git a/ci/lib.sh b/ci/lib.sh index a90d0dc0fd..c3a8cd2104 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -162,6 +162,9 @@ linux-clang|linux-gcc) if [ "$jobname" = linux-gcc ] then export CC=gcc-8 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" + else + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" fi export GIT_TEST_HTTPD=true @@ -182,6 +185,9 @@ osx-clang|osx-gcc) if [ "$jobname" = osx-gcc ] then export CC=gcc-9 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" + else + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" fi # t9810 occasionally fails on Travis CI OS X