From 7ef796bbcf70e52c86e1990032072ca81afe6d2f Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 30 May 2018 15:16:30 -0400 Subject: [PATCH] Use group_regex to serialize scrubber tests Instead of doing two separate test runs, use the group_regex option to stestr to group tests that cannot be run in parallel into the same worker. Change-Id: I3d69d5c72d69484f4e1c9c0b11122d0cf3703d60 Related-Bug: #1768077 --- .stestr.conf | 1 + serial-functests.txt | 1 - tools/generate-blacklist.sh | 9 --------- tox.ini | 9 ++------- 4 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 serial-functests.txt delete mode 100755 tools/generate-blacklist.sh diff --git a/.stestr.conf b/.stestr.conf index b0bcaeef77..a04547d97e 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -1,3 +1,4 @@ [DEFAULT] test_path=${TEST_PATH:-./glance/tests/unit} top_dir=./ +group_regex=(glance\.tests\.functional\.serial\.[^.]+\.) diff --git a/serial-functests.txt b/serial-functests.txt deleted file mode 100644 index 7e37e789b3..0000000000 --- a/serial-functests.txt +++ /dev/null @@ -1 +0,0 @@ -^glance\.tests\.functional\.serial\.* diff --git a/tools/generate-blacklist.sh b/tools/generate-blacklist.sh deleted file mode 100755 index a42f628a4b..0000000000 --- a/tools/generate-blacklist.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -xe - -TOX_INI_DIR="$1" -TOX_TMP_DIR="$2" - -cat "${TOX_INI_DIR}/serial-functests.txt" \ - "${TOX_INI_DIR}/broken-functional-py35-ssl-tests.txt" > \ - "${TOX_TMP_DIR}/func-py35-blacklist.txt" - diff --git a/tox.ini b/tox.ini index ccf5aaec8a..8ba81e1ce6 100644 --- a/tox.ini +++ b/tox.ini @@ -40,8 +40,7 @@ setenv = TEST_PATH = ./glance/tests/functional ignore_errors = True commands = - stestr run --blacklist-file ./serial-functests.txt {posargs} - stestr run --serial --combine --whitelist-file ./serial-functests.txt {posargs} + stestr run {posargs} [testenv:functional-py35] basepython = python3.5 @@ -51,11 +50,7 @@ ignore_errors = True whitelist_externals = bash commands = - # NOTE(rosmaita): calling this script is a complete hack, everything - # is hard-coded. - bash tools/generate-blacklist.sh {toxinidir} {envtmpdir} - stestr run --blacklist-file {envtmpdir}/func-py35-blacklist.txt {posargs} - stestr run --serial --combine --whitelist-file ./serial-functests.txt {posargs} + stestr run --blacklist-file ./broken-functional-py35-ssl-tests.txt {posargs} [testenv:broken-py35-ssl-tests] # NOTE(rosmaita): these tests were being skipped due to bug #1482633, but we