]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/run-cli-tests: s/virtualenv/python -m venv/
authorKefu Chai <kchai@redhat.com>
Sat, 31 Jul 2021 12:51:57 +0000 (20:51 +0800)
committerKen Dreyer <kdreyer@redhat.com>
Tue, 31 Aug 2021 21:25:20 +0000 (17:25 -0400)
so we don't need to use virtualenv python package for creating a
virtualenv, the "venv" module in Python3 would suffice.

see also https://docs.python.org/3/library/venv.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f9514e3386fe1907e240d7079f2251f9cd419cb3)

src/test/run-cli-tests

index 0e94751ceaaea785cf72d6d5ad8fc0fb5d9266ff..9572c68342f05f3cabda45bfde9403cc0e63dd3a 100755 (executable)
@@ -1,11 +1,6 @@
 #!/bin/sh
 set -e
 
-if ! command -v virtualenv >/dev/null; then
-    echo "$0: virtualenv not installed, skipping python-using tests." 1>&2
-    exit 1
-fi
-
 SRCDIR="$(dirname "$0")"
 
 # build directory, if different, can be passed as an argument;
@@ -30,7 +25,7 @@ if [ ! -e "$CRAM_BIN" ]; then
     # patched cram to support that. See upstream ticket at
     # https://bitbucket.org/brodie/cram/issue/9/allow-read-only-directories-for-t
     # -- tv@inktank.com
-    virtualenv --python python3 "$VENV" && $VENV/bin/pip --log "$VENV"/log.txt \
+    python3 -m venv "$VENV" && $VENV/bin/pip --log "$VENV"/log.txt \
         install git+https://github.com/ceph/cram.git@0.7-error-dir#egg=cram
 fi