From: Casey Bodley Date: Tue, 31 Jan 2023 17:31:45 +0000 (-0500) Subject: add tox.ini and update README X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7a3645f271c5bff57a66e7980d59fd5b749eec6b;p=ragweed.git add tox.ini and update README Signed-off-by: Casey Bodley --- diff --git a/README.rst b/README.rst index 5cb6545..04a867f 100644 --- a/README.rst +++ b/README.rst @@ -14,18 +14,14 @@ Each of these phases can be executed separately. For more information on the background of the tests visit: https://www.spinics.net/lists/ceph-devel/msg34636.html -The tests use the pytest test framework. To get started, ensure you have -the ``virtualenv`` software installed; e.g. on Debian/Ubuntu:: +The tests use the Tox tool. To get started, ensure you have +the ``tox`` software installed; e.g. on Debian/Ubuntu:: - sudo apt-get install python-virtualenv + sudo apt install tox on Fedora/RHEL:: - sudo yum install python3-virtualenv - -and then run:: - - ./bootstrap + sudo yum install tox You will need to create a configuration file with the location of the service and two different credentials. A sample configuration file named @@ -33,7 +29,7 @@ service and two different credentials. A sample configuration file named Once you have that file copied and edited, you can run the tests with:: - RAGWEED_CONF=ragweed.conf RAGWEED_STAGES=prepare,check ./virtualenv/bin/pytest -v + RAGWEED_CONF=ragweed.conf RAGWEED_STAGES=prepare,check tox -- -v The phase(s) of the tests are set via ``RAGWEED_STAGES``. The options for ``RAGWEED_STAGES`` are ``prepare`` and ``check``. ``test`` can be used instead of ``check``. @@ -63,4 +59,4 @@ OR:: Finally run the ragweed tests:: - RAGWEED_CONF=ragweed.conf RAGWEED_STAGES=prepare,check ./virtualenv/bin/pytest -v + RAGWEED_CONF=ragweed.conf RAGWEED_STAGES=prepare,check tox -- -v diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..6f9982a --- /dev/null +++ b/tox.ini @@ -0,0 +1,7 @@ +[tox] +envlist = py + +[testenv] +deps = -rrequirements.txt +passenv = PYTHONPATH RAGWEED_CONF RAGWEED_STAGES +commands = python -m pytest {posargs}