run_tests.sh only returns results of last set of tests
Bug #1488693 reported by
Kaitlin Farr
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
Fix Released
|
Medium
|
Dave McCowan |
Bug Description
In barbican/
# run the tests sequentially
testr init
testr run --subunit | subunit-trace --no-failure-debug -f
retval=$?
testr slowest
# run the tests in parallel
SKIP=^\
testr init
testr run $SKIP --parallel --subunit | subunit-trace --no-failure-debug -f
retval=$?
testr slowest
exit $retval
The status of the sequential tests are saved in retval, but then retval is overwritten by the results of the parallel tests.
Changed in barbican: | |
assignee: | nobody → Neetu Jain (nutshi) |
Changed in barbican: | |
assignee: | Neetu Jain (nutshi) → Dave McCowan (dave-mccowan) |
Changed in barbican: | |
milestone: | none → liberty-rc1 |
status: | Fix Committed → Fix Released |
Changed in barbican: | |
milestone: | liberty-rc1 → 1.0.0 |
Changed in barbican: | |
importance: | Undecided → Medium |
To post a comment you must log in.
Proposal:-
1) either the parallel and sequential tests are seperated into 2 different scripts ( aptly named)
2) the return value after both executions is stored in 2 different variables ( $retvalSeq, $retvalParall) and then we echo the return values (with intuitive commennt/tagline) and exit with the highest return value among $retvalSeq, $retvalParall ? If both or one of them is 0 then i guess we are good since we will get to know the failure/success eitherways. The issue is when both of them have a exit status >0 in that case we are printing the results so that user can see the return values from both (even though we returned only the highest value)
I think 1) is cleaner option since in 2) the case of 2 failures is not handled well but I am not sure whats the convention.