]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/run_tox.sh: drop support of python2
authorKefu Chai <kchai@redhat.com>
Sat, 31 Jul 2021 12:44:57 +0000 (20:44 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 31 Jul 2021 13:16:56 +0000 (21:16 +0800)
since we don't support python2 anymore, there is not need to mention or
support python2 when performing tests

Signed-off-by: Kefu Chai <kchai@redhat.com>
doc/dev/developer_guide/dash-devel.rst
doc/dev/developer_guide/tests-unit-tests.rst
src/script/run_tox.sh

index 5c616ade37c9450a2feaee34c4a98992a363bd41..3e33566d4d47968f8b32c9ce6e7b6cd79faf6914 100644 (file)
@@ -1124,7 +1124,7 @@ Unit tests based on tox
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 We included a ``tox`` configuration file that will run the unit tests under
-Python 2 or 3, as well as linting tools to guarantee the uniformity of code.
+Python 3, as well as linting tools to guarantee the uniformity of code.
 
 You need to install ``tox`` and ``coverage`` before running it. To install the
 packages in your system, either install it via your operating system's package
@@ -1139,9 +1139,6 @@ Alternatively, you can use Python's native package installation method::
 To run the tests, run ``src/script/run_tox.sh`` in the dashboard directory (where
 ``tox.ini`` is located)::
 
-  ## Run Python 2+3 tests+lint commands:
-  $ ../../../script/run_tox.sh --tox-env py27,py3,lint,check
-
   ## Run Python 3 tests+lint commands:
   $ ../../../script/run_tox.sh --tox-env py3,lint,check
 
index de9d6de6fcd101413d120e5396d6a549fd0794e0..21db9bf9f4cba33f4b353189b0bd205f37526f81 100644 (file)
@@ -145,7 +145,6 @@ environments and run options::
   $ tox -e py3,lint,check
 
   ## To run it as Jenkins would:  
-  $ ../../../script/run_tox.sh --tox-env py27,py3,lint,check
   $ ../../../script/run_tox.sh --tox-env py3,lint,check
 
 Manager core unit tests
index 2dab5f1d98730b894213209edce6a2390e2c30c7..9d45d8b9246ce41241aae48e047123fb7a5b8a5f 100755 (executable)
@@ -25,13 +25,13 @@ options:
 
 example:
 
-following command will run tox with envlist of "py27,py3" using the "tox.ini" in current directory.
+following command will run tox with envlist of "py3,mypy" using the "tox.ini" in current directory.
 
-  $prog_name --tox-envs py27,py3
+  $prog_name --tox-envs py3,mypy
 
-following command will run tox with envlist of "py27" using "/ceph/src/python-common/tox.ini"
+following command will run tox with envlist of "py3" using "/ceph/src/python-common/tox.ini"
 
-  $prog_name --tox-envs py27 --tox-path /ceph/src/python-common
+  $prog_name --tox-envs py3 --tox-path /ceph/src/python-common
 EOF
 }
 
@@ -116,17 +116,7 @@ function main() {
             echo "$PWD already exists, but it's not a virtualenv. test_name empty?"
             exit 1
         fi
-        # try to use the prefered python for creating the virtual env for
-        # bootstrapping tox.
-        case $tox_envs in
-            py3*)
-                virtualenv_python=python3;;
-            py2*)
-                virtualenv_python=python2;;
-            *)
-                virtualenv_python=python3;;
-        esac
-        $source_dir/src/tools/setup-virtualenv.sh --python=${virtualenv_python} ${venv_path}
+        $source_dir/src/tools/setup-virtualenv.sh ${venv_path}
     fi
     source ${venv_path}/bin/activate
     pip install tox