After upgrade to stestr cannot access .testrepository

Bug #1715859 reported by Maciej Kucia
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-testr
Invalid
Undecided
Unassigned
tempest
Expired
Undecided
Unassigned

Bug Description

In the past I used to generate test results for Jenkins (Tempest unit tests):

 testr last --subunit | subunit2junitxml --no-passthrough -o "$LOG_DIR/results.xml"

Currently my CI is broken because .testrepository directory is missing. It seems that switch to stestr might be the cause.

Would appreciate any recommendations.

Revision history for this message
Maciej Kucia (maciejkucia) wrote :

It seems that in Tempest there is .testr.conf but no .stestr.conf

Revision history for this message
Matthew Treinish (treinish) wrote :

Just switch your CI to use:

stestr last --subunit | subunit2junitxml --no-passthrough -o "$LOG_DIR/results.xml"

it should work fine and doesn't need an .stestr.conf to work.

Revision history for this message
Matthew Treinish (treinish) wrote :

Just for reference we had to do the same thing on the upstream CI: https://github.com/openstack-infra/project-config/commit/5e4152259d4c4ee33890f373ea42b7a97fd80922

Revision history for this message
Maciej Kucia (maciejkucia) wrote :

Thanks, that makes sense. So simple yet I did not try that. Sadly it does add some extra logic to my scripts as 'old' testr must be supported as well :(

I think changes in os-testr should be backwards-compatible.

Revision history for this message
Ryan Beisner (1chb1n) wrote :

This appears to be breaking refstack-client:

https://bugs.launchpad.net/refstack/+bug/1716418

Revision history for this message
Matthew Treinish (treinish) wrote :

The switch from testr to stestr was a documented breaking change in the 1.0.0 release. The entire internals of os-testr were changed and simplified as part of the 1.0.0 release. It also makes the internal test runner in ostestr actually use a maintained test runner.

But in this case you really just need an if statement in your jenkins job like:

https://github.com/openstack-infra/project-config/blob/master/jenkins/scripts/run-tox.sh#L33-L47

The fact that all openstack projects don't use the same test runner (which is the real cause of the issue here) isn't something we can fix in ostestr and is a larger problem.

Changed in os-testr:
status: New → Invalid
Revision history for this message
Matthew Treinish (treinish) wrote :

I don't understand what the bug is on tempest or what has to be fixed. Is there something that needs to be done on tempest?

Changed in tempest:
status: New → Incomplete
Revision history for this message
Maciej Kucia (maciejkucia) wrote :

Tempest is now fine since change
https://github.com/openstack/tempest/commit/d0b8ebd84a649bd58f2d0eb946597c7bbd63dab2
(Switch to use stestr for unit tests directly)

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for tempest because there has been no activity for 60 days.]

Changed in tempest:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.