Browse Source

Handle stestr execution for stackviz

This commit makes to handle a stestr execution for stackviz process.
Tempest is now in the process of switching the tempest run command to
use stestr internally instead of testrepository. This means that results
will be stored in .stestr instead of .testrepository. So, this commit
makes to handle a stestr or testrepository execution with checking which
directory exists before attempting to process the subunit results.

Change-Id: Ib19d3779deb89142e95762794dd1ce3fe3236b55
changes/90/529490/1
Masayuki Igawa 3 years ago
parent
commit
cf8c872bb8
No known key found for this signature in database GPG Key ID: 290F53EDC899BF89
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      functions.sh

+ 6
- 2
functions.sh View File

@ -557,13 +557,17 @@ function process_stackviz {
cp -r $stackviz_path/share/stackviz-html $log_path/stackviz
pushd $project_path
TEST_CMD="testr"
if [ -d ".stestr" ]; then
TEST_CMD="stestr"
fi
if [ -f $log_path/dstat-csv_log.txt ]; then
sudo testr last --subunit | $stackviz_path/bin/stackviz-export \
sudo $TEST_CMD last --subunit | $stackviz_path/bin/stackviz-export \
--dstat $log_path/dstat-csv_log.txt \
--env --stdin \
$log_path/stackviz/data
else
sudo testr last --subunit | $stackviz_path/bin/stackviz-export \
sudo $TEST_CMD last --subunit | $stackviz_path/bin/stackviz-export \
--env --stdin \
$log_path/stackviz/data
fi


Loading…
Cancel
Save