Browse Source

Use stestr for unit tests

Change-Id: Ifaf3991e1c9400683e9c98185b86cb39ac3d318d
tags/10.0.0.0b3
rabi 2 years ago
parent
commit
93746a9b28
4 changed files with 7 additions and 11 deletions
  1. +1
    -0
      .gitignore
  2. +3
    -0
      .stestr.conf
  3. +0
    -8
      .testr.conf
  4. +3
    -3
      tox.ini

+ 1
- 0
.gitignore View File

@@ -9,6 +9,7 @@ tags
heat-test.db
heat.sqlite
.venv
.stestr/*
AUTHORS
ChangeLog
templates/cloudformation-examples


+ 3
- 0
.stestr.conf View File

@@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TEST_PATH:-./heat/tests}
top_dir=./

+ 0
- 8
.testr.conf View File

@@ -1,8 +0,0 @@
[DEFAULT]
test_command=
PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
START_AT=${TESTR_START_DIR:-.}
${PYTHON} -m subunit.run discover -s $START_AT -t . $LISTOPT $IDOPTION
if [ "$START_AT" = "." ]; then for plugin in $START_AT/contrib/*; do ${PYTHON} -m subunit.run discover -s $plugin $LISTOPT $IDOPTION; done; fi
test_id_option=--load-list $IDFILE
test_list_option=--list

+ 3
- 3
tox.ini View File

@@ -7,14 +7,14 @@ skipsdist = True
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
OS_TEST_PATH=heat/tests
TESTR_START_DIR=heat/tests
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
python setup.py testr --slowest --testr-args='{posargs}'
stestr run '{posargs}'
stestr slowest

whitelist_externals =
bash
@@ -24,7 +24,7 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:py27log]
commands =
find . -type f -name "*.py[c|o]" -delete
ostestr '^(?!heat_integrationtests){posargs}'
stestr run '^(?!heat_integrationtests){posargs}'

[testenv:pep8]
commands =


Loading…
Cancel
Save