Comments (7)
I think it causes because the file has idempotent ids, and it's like regexes.
tempest.api.volume.test_volumes_list.VolumesListTestJSON.test_volumes_list_by_bootable[id-2016a942-3020-40d7-95ce-7613bf8407ce]
And ostestr just ignores the --whitelist-file
option in the list mode.
So, you would face the same error if you run ostestr without -l
option like below.
$ ostestr --whitelist-file ./2018.02-test-list.txt
Traceback (most recent call last):
File "/home/masayuki/git/openstack/os-testr/.tox/py36/bin/ostestr", line 11, in <module>
sys.exit(main())
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/os_testr/ostestr.py", line 273, in main
exit(ostestr(sys.argv[1:]))
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/os_testr/ostestr.py", line 269, in ostestr
return _select_and_call_runner(opts, regex, others)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/os_testr/ostestr.py", line 222, in _select_and_call_runner
black_regex=opts.black_regex)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/os_testr/ostestr.py", line 177, in call_testr
black_regex=black_regex)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/stestr/commands/run.py", line 416, in run_command
suppress_attachments=suppress_attachments)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/stestr/commands/run.py", line 463, in _run_tests
cmd.setUp()
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/stestr/test_processor.py", line 148, in setUp
black_regex=self.black_regex)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/stestr/selection.py", line 113, in construct_list
list_of_test_cases = filter_tests(regexes, test_ids)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib/python3.6/site-packages/stestr/selection.py", line 29, in filter_tests
_filters = list(map(re.compile, filters))
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib64/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib64/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib64/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib64/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib64/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/home/masayuki/git/openstack/os-testr/.tox/py36/lib64/python3.6/sre_parse.py", line 553, in _parse
raise source.error(msg, len(this) + 1 + len(that))
sre_constants.error: bad character range 5-4 at position 92
from stestr.
@masayukig Thanks for the input, yup the same error is coming on ostestr also. Is it possible to add idempotent ids support in stestr also?
from stestr.
I think it might be good if stestr run
accepts stestr list
output with idempotent ids like Tempest test list. But I think it might be a bit tricky change and a hard to keep consistency to distinguish regexes or idempotent ids.
@mtreinish Any thoughts?
from stestr.
@chkumar246 actually, there can be not only idempotent ids but also decorators such as slow
, negative
, compute
, volume
, etc...
So, it might be possible with applying a filter which is using [0]
after splitting with [
character.
But I think we need to introduce a new option for that like --whitelist-file-noregex
.. (I'm not a fan of like this option addition, though..)
from stestr.
Ah, I think stestr run --load-list
is the option for that. But it's only in run
not in list
. So, one idea is enabling that bringing the option to list
too.
Another idea is introducing --dry-run
option to stestr run
. But I feel that would be conflicted with stestr list
command, though.
from stestr.
Right, this is not a bug. The docs for --whiteliest-file clearly say (in multiple places) that each line is treated as a separate regex. Passing an invalid regex in (which is what you're doing with that file from refstack) is things failing because of bad input. We maybe could have a better error message which doesn't result in a strack trace, but tha's a separate thing. This has nothing to do with idempotent ids or any other attributes. The '[' ']' surrounding the args are really just an artifact of displaying the attributes set on a test. You can already easily just filter on them using a valid regex.
What you have there is list for the --load-list argument on stestr run. Since you're specifying exactly what tests to run. IIRC the refstack/interop guideline docs actually explicitly say use --load-list.
@masayukig there isn't really a need for --load-list as an option on stestr list because there is nothing to list with --load-list, it would be the same as running cat load_list.txt
. --load-list takes the place of discovery and any test selection and explicitly tells stestr run what the tests it needs to schedule and execute are.
from stestr.
@mtreinish yeah, I noticed that. So, I was thinking --dry-run might be one option. But I feel it's a bit overkill/too much. So, I think your #182 change is enough.
from stestr.
Related Issues (20)
- Finish deprecation and removal of blacklist, black_regex, and whitelist
- Finish deprecation of sql repository type and --repository-type argument
- stestr run fails with stestr: 'run' is not a stestr command. See 'stestr --help'. with Python 3.10 HOT 3
- stestr run specific test but it is skipped by other test's skiptest requirement
- Support for clean termination on receiving SIGNIT HOT 2
- ResourceWarning messages being printed HOT 1
- stestr doesn't handle unittest.subTests well in its output log HOT 1
- Test are run out of order when using `--load-list`
- Commands not found on Debian Buster ('init' is not a stestr command.) HOT 4
- Ignore erroneous files that don't contain the required test
- pyproject.toml support
- New release? HOT 3
- Stestr does not work with python-subunit 1.4.3 and testtools 2.6.0 HOT 1
- Stestr does not work with python-subunit 1.4.3 HOT 1
- stestr==4.0.1 does not have a run command HOT 3
- Cannot use pyproject.toml configs on the first run
- Add Pytest based test executor
- Testcase run twice when import a class with testcase in python file.
- FAIL: stestr.tests.test_return_codes.TestReturnCodesToxIni.test_no_repo_dir on `python 3.12.2` HOT 2
- test failures with pytest 8.2: AttributeError: 'TestUtil' object has no attribute 'runTest'. Did you mean: 'subTest'? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stestr.