Backport 'Check that generate-subunit exists'
The python-glanceclient functional tests in stable/pike have run into a devstack issue [0] that was fixed in master, so backporting the fix and a followup correction: Check that generate-subunit exists before using it (cherry picked from commitcbd5f4e0ad
) Fix comment wording nit (cherry picked from commit03ae3c485e
) [0] Log extract from https://review.openstack.org/#/c/529834/ 2017-12-22 19:16:02.880 | Error on exit 2017-12-22 19:16:02.881 | ./stack.sh: line 540: generate-subunit: command not found ERROR { "delta": "0:00:03.150918", "end": "2017-12-22 19:16:02.898596", "failed": true, "rc": 127, "start": "2017-12-22 19:15:59.747678" } Change-Id: I0fecb027e5be6f4d7bb0bf34e59a43543a421f38 Needed-by: Idaa2f4b920e131320499c9e460ade74df1d5a264
This commit is contained in:
parent
058700039b
commit
b711396805
6
stack.sh
6
stack.sh
@ -537,15 +537,21 @@ function exit_trap {
|
||||
|
||||
if [[ $r -ne 0 ]]; then
|
||||
echo "Error on exit"
|
||||
# If we error before we've installed os-testr, this will fail.
|
||||
if type -p generate-subunit > /dev/null; then
|
||||
generate-subunit $DEVSTACK_START_TIME $SECONDS 'fail' >> ${SUBUNIT_OUTPUT}
|
||||
fi
|
||||
if [[ -z $LOGDIR ]]; then
|
||||
$TOP_DIR/tools/worlddump.py
|
||||
else
|
||||
$TOP_DIR/tools/worlddump.py -d $LOGDIR
|
||||
fi
|
||||
else
|
||||
# If we error before we've installed os-testr, this will fail.
|
||||
if type -p generate-subunit > /dev/null; then
|
||||
generate-subunit $DEVSTACK_START_TIME $SECONDS >> ${SUBUNIT_OUTPUT}
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user