Skip to content

Commit cf55866

Browse files
committed
[test-release] fallback to py3's venv module
If virtualenv is not available, we can look for py3's venv instead. We only use this particular env for installing and running the test suite.
1 parent 21c0b4c commit cf55866

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

llvm/utils/release/test-release.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,12 +502,18 @@ fi
502502
# Setup the test-suite. Do this early so we can catch failures before
503503
# we do the full 3 stage build.
504504
if [ $do_test_suite = "yes" ]; then
505+
venv=virtualenv
506+
if ! type -P 'virtualenv' > /dev/null 2>&1 ; then
507+
check_program_exists 'python3'
508+
venv="python3 -m venv"
509+
fi
510+
505511
SandboxDir="$BuildDir/sandbox"
506512
Lit=$SandboxDir/bin/lit
507513
TestSuiteBuildDir="$BuildDir/test-suite-build"
508514
TestSuiteSrcDir="$BuildDir/llvm-test-suite"
509515

510-
virtualenv $SandboxDir
516+
${venv} $SandboxDir
511517
$SandboxDir/bin/python $BuildDir/llvm-project/llvm/utils/lit/setup.py install
512518
mkdir -p $TestSuiteBuildDir
513519
fi

0 commit comments

Comments
 (0)