]> git.proxmox.com Git - ceph.git/blobdiff - ceph/doc/dev/developer_guide/running-tests-locally.rst
import 15.2.5
[ceph.git] / ceph / doc / dev / developer_guide / running-tests-locally.rst
index f80a6f52b339c62f166051a48ebee471bf241a53..49eff3ecec1555e1d22d19eb6809ef948b0157c7 100644 (file)
@@ -36,6 +36,8 @@ This means the cluster is running.
 Step 3 - run s3-tests
 ^^^^^^^^^^^^^^^^^^^^^
 
+.. highlight:: console
+
 To run the s3tests suite do the following::
 
    $ ../qa/workunits/rgw/run-s3tests.sh
@@ -50,17 +52,12 @@ Running your first test
 The Python tests in Ceph repository can be executed on your local machine
 using `vstart_runner.py`_. To do that, you'd need `teuthology`_ installed::
 
-    $ git clone https://github.com/ceph/teuthology
-    $ cd teuthology/
-    $ virtualenv -p python2.7 ./venv
+    $ virtualenv --python=python3 venv
     $ source venv/bin/activate
-    $ pip install --upgrade pip
-    $ pip install -r requirements.txt
-    $ python setup.py develop
+    $ pip install 'setuptools >= 12'
+    $ pip install git+https://github.com/ceph/teuthology#egg=teuthology[test]
     $ deactivate
 
-.. note:: The pip command above is pip2, not pip3; run ``pip --version``.
-
 The above steps installs teuthology in a virtual environment. Before running
 a test locally, build Ceph successfully from the source (refer
 :doc:`/install/build-ceph`) and do::
@@ -73,24 +70,20 @@ To run a specific test, say `test_reconnect_timeout`_ from
 `TestClientRecovery`_ in ``qa/tasks/cephfs/test_client_recovery``, you can
 do::
 
-    $ python2 ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery.test_reconnect_timeout
+    $ python ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery.test_reconnect_timeout
 
 The above command runs vstart_runner.py and passes the test to be executed as
 an argument to vstart_runner.py. In a similar way, you can also run the group
 of tests in the following manner::
 
     $ # run all tests in class TestClientRecovery
-    $ python2 ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery
+    $ python ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery
     $ # run  all tests in test_client_recovery.py
-    $ python2 ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery
+    $ python ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery
 
 Based on the argument passed, vstart_runner.py collects tests and executes as
 it would execute a single test.
 
-.. note:: vstart_runner.py as well as most tests in ``qa/`` are only
-          compatible with ``python2``. Therefore, use ``python2`` to run the
-          tests locally.
-
 vstart_runner.py can take the following options -
 
 --clear-old-log             deletes old log file before running the test