Merge "Add subunit output for total elapsed time"
This commit is contained in:
commit
973fb21de6
8
stack.sh
8
stack.sh
@ -42,6 +42,8 @@ if [[ -n "$NOUNSET" ]]; then
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set start of devstack timestamp
|
||||||
|
DEVSTACK_START_TIME=$(date +%s)
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
# =============
|
# =============
|
||||||
@ -481,11 +483,14 @@ function exit_trap {
|
|||||||
|
|
||||||
if [[ $r -ne 0 ]]; then
|
if [[ $r -ne 0 ]]; then
|
||||||
echo "Error on exit"
|
echo "Error on exit"
|
||||||
|
generate-subunit $DEVSTACK_START_TIME $SECONDS 'fail' >> ${SUBUNIT_OUTPUT}
|
||||||
if [[ -z $LOGDIR ]]; then
|
if [[ -z $LOGDIR ]]; then
|
||||||
$TOP_DIR/tools/worlddump.py
|
$TOP_DIR/tools/worlddump.py
|
||||||
else
|
else
|
||||||
$TOP_DIR/tools/worlddump.py -d $LOGDIR
|
$TOP_DIR/tools/worlddump.py -d $LOGDIR
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
generate-subunit $DEVSTACK_START_TIME $SECONDS >> ${SUBUNIT_OUTPUT}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $r
|
exit $r
|
||||||
@ -710,6 +715,9 @@ if [[ "$OFFLINE" != "True" ]]; then
|
|||||||
PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:-""} $TOP_DIR/tools/install_pip.sh
|
PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:-""} $TOP_DIR/tools/install_pip.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install subunit for the subunit output stream
|
||||||
|
pip_install -U os-testr
|
||||||
|
|
||||||
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
||||||
|
|
||||||
# Install Python packages into a virtualenv so that we can track them
|
# Install Python packages into a virtualenv so that we can track them
|
||||||
|
3
stackrc
3
stackrc
@ -29,6 +29,9 @@ DATA_DIR=${DEST}/data
|
|||||||
# Destination for status files
|
# Destination for status files
|
||||||
SERVICE_DIR=${DEST}/status
|
SERVICE_DIR=${DEST}/status
|
||||||
|
|
||||||
|
# Path for subunit output file
|
||||||
|
SUBUNIT_OUTPUT=${DEST}/devstack.subunit
|
||||||
|
|
||||||
# Determine stack user
|
# Determine stack user
|
||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
STACK_USER=stack
|
STACK_USER=stack
|
||||||
|
Loading…
Reference in New Issue
Block a user