Skip to content

Commit 5211df0

Browse files
committed
Use devstack subunit stream in output
Devstack is starting to emit a subunit event for whether devstack was successful or not and how long it took to execute. This will enable us to track devstack along with tempest in subunit2sql and also make local visualizations of devstack easier. Eventually the data in the devstack stream will be a bit more granular which will enable additional analysis Change-Id: I5c2fd8ae8c33edce73836dd0c0c5107dc73685c6 Depends-On: I07112dde996c3e2c73f5aafc9b73d33d26374633
1 parent e5f0b6c commit 5211df0

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

functions.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -630,17 +630,25 @@ function process_testr_artifacts {
630630
log_path=$BASE/logs/$path_prefix
631631
fi
632632

633+
if [[ -f $BASE/devstack.subunit ]]; then
634+
sudo cp $BASE/devstack.subunit $log_path/testrepository.subunit
635+
fi
636+
633637
# Check for an interrupted run first because 0 will always exist
634638
if [ -f $repo_path/tmp* ]; then
635639
# If testr timed out, collect temp file from testr
636-
sudo cp $repo_path/tmp* $log_path/testrepository.subunit
637-
archive_test_artifact $log_path/testrepository.subunit
640+
sudo cat $repo_path/tmp* >> $WORKSPACE/tempest.subunit
641+
archive_test_artifact $WORKSPACE/tempest.subunit
638642
elif [ -f $repo_path/0 ]; then
639643
pushd $project_path
640-
sudo testr last --subunit > $WORKSPACE/testrepository.subunit
644+
sudo testr last --subunit > $WORKSPACE/tempest.subunit
641645
popd
642-
sudo mv $WORKSPACE/testrepository.subunit \
643-
$log_path/testrepository.subunit
646+
fi
647+
if [[ -f $log_path/testrepository.subunit ]] ; then
648+
if [[ -f $WORKSPACE/tempest.subunit ]] ; then
649+
sudo cat $WORKSPACE/tempest.subunit \
650+
| sudo tee -a $log_path/testrepository.subunit > /dev/null
651+
fi
644652
sudo /usr/os-testr-env/bin/subunit2html \
645653
$log_path/testrepository.subunit $log_path/testr_results.html
646654
archive_test_artifact $log_path/testrepository.subunit

0 commit comments

Comments
 (0)