list ignores whitelist-file argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-testr |
New
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce
1. clone tempest
2. install requirements
3. ostestr --list --whitelist-file whitelist.txt # lists all tests
4. stestr list --whitelist-file whitelist.txt # lists whitelisted tests
Given a whitelist of the following format
$ cat whitelist.txt
tempest.
tempest.
tempest.
tempest.
tempest.
ostestr --whitelist-file whitelist.txt --list
will not match the list provided.
Perhaps it couldn't find any tests because it does not use regex when listing files from a whitelist and defaults to listing all tests if the result set is empty but I would like to have the output to include the test metadata too, like
tempest.
When running with a whitelist it does run the correct files (I don't have services running at the moment).
$ ostestr --whitelist-file whitelist.txt
2017-10-26 12:32:35.648 10441 INFO tempest [-] Using tempest config file /etc/tempest/
2017-10-26 12:32:35.676 10443 INFO tempest [-] Using tempest config file /etc/tempest/
2017-10-26 12:32:35.696 10445 INFO tempest [-] Using tempest config file /etc/tempest/
2017-10-26 12:32:35.699 10447 INFO tempest [-] Using tempest config file /etc/tempest/
{0} setUpClass (tempest.
{1} setUpClass (tempest.
{3} setUpClass (tempest.
{2} setUpClass (tempest.
as advertised, the list option states:
--list, -l List all the tests which will be run.
but we can clearly see the --list option print all the tests, I did not include them for brevity but you can try it out.
stestr works fine though so we can skip this if we plan on replacing ostestr with stestr :)
$ stestr list --whitelist-file whitelist.txt
tempest.
tempest.
tempest.
tempest.
tempest.
description: | updated |
I'm just curious is os-testr installed in the same python environment as stestr 1.1.0? There was a bug in stestr where the whitelist argument was being ignored which should be fixed in stestr 1.1.0. We do a straight copy of the whitelist file argument to stestr's run command:
https:/ /git.openstack. org/cgit/ openstack/ os-testr/ tree/os_ testr/ostestr. py#n168
so if there's a bug it's in stestr. But I was pretty sure we got all the filter stuff working in stestr with:
https:/ /github. com/mtreinish/ stestr/ commit/ 978fc905bcc4bfe b8be96e7e3b8568 5cdde906ab