File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ if [[ -n "$NOUNSET" ]]; then
4242 set -o nounset
4343fi
4444
45+ # Set start of devstack timestamp
46+ DEVSTACK_START_TIME=$( date +%s)
4547
4648# Configuration
4749# =============
@@ -481,11 +483,14 @@ function exit_trap {
481483
482484 if [[ $r -ne 0 ]]; then
483485 echo " Error on exit"
486+ generate-subunit $DEVSTACK_START_TIME $SECONDS ' fail' >> ${SUBUNIT_OUTPUT}
484487 if [[ -z $LOGDIR ]]; then
485488 $TOP_DIR /tools/worlddump.py
486489 else
487490 $TOP_DIR /tools/worlddump.py -d $LOGDIR
488491 fi
492+ else
493+ generate-subunit $DEVSTACK_START_TIME $SECONDS >> ${SUBUNIT_OUTPUT}
489494 fi
490495
491496 exit $r
@@ -710,6 +715,9 @@ if [[ "$OFFLINE" != "True" ]]; then
710715 PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:- " " } $TOP_DIR /tools/install_pip.sh
711716fi
712717
718+ # Install subunit for the subunit output stream
719+ pip_install -U os-testr
720+
713721TRACK_DEPENDS=${TRACK_DEPENDS:- False}
714722
715723# Install Python packages into a virtualenv so that we can track them
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ DATA_DIR=${DEST}/data
2929# Destination for status files
3030SERVICE_DIR=${DEST} /status
3131
32+ # Path for subunit output file
33+ SUBUNIT_OUTPUT=${DEST} /devstack.subunit
34+
3235# Determine stack user
3336if [[ $EUID -eq 0 ]]; then
3437 STACK_USER=stack
You can’t perform that action at this time.
0 commit comments