run_tests.sh only returns results of last set of tests

Bug #1488693 reported by Kaitlin Farr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Medium
Dave McCowan

Bug Description

In barbican/functionaltests/run_tests.sh, the exit code is saved as follows:

# run the tests sequentially
testr init
testr run --subunit | subunit-trace --no-failure-debug -f
retval=$?
testr slowest

# run the tests in parallel
SKIP=^\(\?\!\.\*ProjectQuotasPagingTestCase\)
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.

Neetu Jain (nutshi)
Changed in barbican:
assignee: nobody → Neetu Jain (nutshi)
Revision history for this message
Neetu Jain (nutshi) wrote :

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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/224979
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=5b08265cbf98681a22f6cc7e84e23de3c967a64d
Submitter: Jenkins
Branch: master

commit 5b08265cbf98681a22f6cc7e84e23de3c967a64d
Author: Dave McCowan <email address hidden>
Date: Thu Sep 17 23:23:13 2015 -0400

    Add function to catch unknown attributes in URI

    Added a _lookup() function that will catch attribute after {CA_ID}/ in
    the URI that does not match a supported keyword (cacert, intermediates, etc.)
    Before this caused a 500 (server error) to be returned, now the correct
    404 (not found) error is returned.

    Change-Id: I0a15d4ebcbce58a807c4f4852b08b774c315ce0d
    Closes-bug: #1488693

Changed in barbican:
status: New → Fix Committed
Revision history for this message
Dave McCowan (dave-mccowan) wrote :

The above commit is for a different bug. This bug has not yet been fixed.

Changed in barbican:
status: Fix Committed → Confirmed
Revision history for this message
Dave McCowan (dave-mccowan) wrote :

Hi Neetu-- Use your best judgement and submit a patch. More reviewers look at patches than bug report logs.

Changed in barbican:
assignee: Neetu Jain (nutshi) → Dave McCowan (dave-mccowan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

Fix proposed to branch: master
Review: https://review.openstack.org/225506

Changed in barbican:
status: Confirmed → In Progress
Revision history for this message
Neetu Jain (nutshi) wrote :

sorry got sidetracked .. cahnge looks good to me.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/225506
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=b657dd00f1ecf3567146375065e35f9c4884e4ac
Submitter: Jenkins
Branch: master

commit b657dd00f1ecf3567146375065e35f9c4884e4ac
Author: Dave McCowan <email address hidden>
Date: Sun Sep 20 15:44:58 2015 -0400

    Combine exit codes of the two functional test runs

    The script was only returning the exit code of the second of the
    two test runs. With this change, a failure of either either run
    will correctly be reported as an error.

    Change-Id: I81766dee2ac141ceddf683b50a2aef11a79f968b
    Closes-bug: #1488693

Changed in barbican:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in barbican:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in barbican:
milestone: liberty-rc1 → 1.0.0
Changed in barbican:
importance: Undecided → Medium
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.