mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-05-16 13:56:11 +08:00
Allow running an individual test using a relative path
Since the tests now run in a different location in the container since PR #1378, the documentation needed to be updated. Instead, we should just allow the user to pass a relative path instead.
This commit is contained in:
@@ -93,7 +93,12 @@ if [ -n "$with_pgsql" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(cd "$source_dir" && $docker run "${container_opts[@]}" $test_image "$@")
|
tox_args=$@
|
||||||
|
if [[ $tox_args == tests/* ]]; then
|
||||||
|
tox_args="/root/mbs/src/${tox_args}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
(cd "$source_dir" && $docker run "${container_opts[@]}" $test_image "$tox_args")
|
||||||
|
|
||||||
rv=$?
|
rv=$?
|
||||||
|
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ There are options to change the tests enviornment:
|
|||||||
For example, ``contrib/run-unittests.sh --py3 --with-pgsql``.
|
For example, ``contrib/run-unittests.sh --py3 --with-pgsql``.
|
||||||
|
|
||||||
You can specify the subset of tests to run inside the container as well. Tests
|
You can specify the subset of tests to run inside the container as well. Tests
|
||||||
specified from command-line are passed to ``py.test`` directly. Please note that,
|
specified from the command-line are passed to ``py.test`` directly. Please note that,
|
||||||
the path of each test must start with ``/src/``. For example::
|
the path of each test must be a relative path. For example::
|
||||||
|
|
||||||
contrib/run-unittests.sh \
|
contrib/run-unittests.sh \
|
||||||
/src/tests/test_utils/ \
|
tests/test_utils/ \
|
||||||
/src/tests/test_mmd_resolver.py \
|
tests/test_mmd_resolver.py \
|
||||||
/src/tests/test_builder/test_koji.py::TestKojiBuilder::test_tag_to_repo
|
tests/test_builder/test_koji.py::TestKojiBuilder::test_tag_to_repo
|
||||||
|
|
||||||
Inside Vagrant machine
|
Inside Vagrant machine
|
||||||
----------------------
|
----------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user