[PATCH] D83990: [test-release] fallback to py3's venv module

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 15:02:39 PDT 2020


bcain created this revision.
bcain added a reviewer: hans.
bcain added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83990

Files:
  llvm/utils/release/test-release.sh


Index: llvm/utils/release/test-release.sh
===================================================================
--- llvm/utils/release/test-release.sh
+++ llvm/utils/release/test-release.sh
@@ -306,6 +306,11 @@
   check_program_exists 'objdump'
 fi
 
+venv=virtualenv
+if ! type -P 'virtualenv' > /dev/null 2>&1 ; then
+  check_program_exists 'python3'
+  venv="python3 -m venv"
+fi
 check_program_exists ${MAKE}
 
 # Export sources to the build directory.
@@ -500,7 +505,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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83990.278609.patch
Type: text/x-patch
Size: 739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200716/5e3b13b7/attachment.bin>


More information about the llvm-commits mailing list