diff --git a/llvm/utils/release/test-release.sh b/llvm/utils/release/test-release.sh --- a/llvm/utils/release/test-release.sh +++ b/llvm/utils/release/test-release.sh @@ -320,6 +320,12 @@ tar -C $SrcDir --strip-components=1 -xzf - if [ "$do_test_suite" = "yes" ]; then + venv=virtualenv + if ! type -P 'virtualenv' > /dev/null 2>&1 ; then + check_program_exists 'python3' + venv="python3 -m venv" + fi + TestSuiteSrcDir=$BuildDir/llvm-test-suite mkdir -p $TestSuiteSrcDir @@ -500,7 +506,7 @@ TestSuiteBuildDir="$BuildDir/test-suite-build" TestSuiteSrcDir="$BuildDir/llvm-test-suite" - virtualenv $SandboxDir + ${venv} $SandboxDir $SandboxDir/bin/python $BuildDir/llvm-project/llvm/utils/lit/setup.py install mkdir -p $TestSuiteBuildDir fi