Browse Source

Add new env variable to specify test path

This commit adds the env variable OS_TEST_PATH to specify the test
discovery path for testr. This can be used to specify which path will
be used for test discovery.
Closes-Bug: #1260710

Change-Id: Idcc8f6b5d82a2adc1a1f8ad04a47e8d694dc7de7
tags/1
Matthew Treinish 7 years ago
parent
commit
bf47061e03
2 changed files with 5 additions and 1 deletions
  1. +2
    -1
      .testr.conf
  2. +3
    -0
      tox.ini

+ 2
- 1
.testr.conf View File

@@ -2,7 +2,8 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
${PYTHON:-python} -m subunit.run discover -t ./ ./tempest $LISTOPT $IDOPTION
OS_TEST_PATH=${OS_TEST_PATH:-./tempest} \
${PYTHON:-python} -m subunit.run discover -t ./ $OS_TEST_PATH $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]*\.)*

+ 3
- 0
tox.ini View File

@@ -12,12 +12,15 @@ usedevelop = True
install_command = pip install -U {opts} {packages}

[testenv:py26]
setenv = OS_TEST_PATH=./tempest/tests
commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'

[testenv:py33]
setenv = OS_TEST_PATH=./tempest/tests
commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'

[testenv:py27]
setenv = OS_TEST_PATH=./tempest/tests
commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'

[testenv:all]


Loading…
Cancel
Save