testr last requires sudo
736d1c987b breaks testrepository.subunit.gz
and testr_results.html.gz
Basic testing shows that running the command with sudo resolves the issue.
Without sudo, this is the error message run using jenkins user:
"local variable 'run_subunit_content' referenced before assignment"
Change-Id: Ia2f10cb2d09aa5db3957e30f9a7c25cc40c54881
This commit is contained in:
@@ -635,7 +635,7 @@ function cleanup_host {
|
||||
# Process testr artifacts.
|
||||
if [ -f $BASE/new/tempest/.testrepository/0 ]; then
|
||||
pushd $BASE/new/tempest
|
||||
testr last --subunit > $WORKSPACE/testrepository.subunit
|
||||
sudo testr last --subunit > $WORKSPACE/testrepository.subunit
|
||||
popd
|
||||
sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
|
||||
sudo python /usr/local/jenkins/slave_scripts/subunit2html.py $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
|
||||
@@ -652,7 +652,7 @@ function cleanup_host {
|
||||
fi
|
||||
if [ -f $BASE/old/tempest/.testrepository/0 ]; then
|
||||
pushd $BASE/old/tempest
|
||||
testr last --subunit > $WORKSPACE/testrepository.subunit
|
||||
sudo testr last --subunit > $WORKSPACE/testrepository.subunit
|
||||
popd
|
||||
sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/old/testrepository.subunit
|
||||
sudo python /usr/local/jenkins/slave_scripts/subunit2html.py $BASE/logs/old/testrepository.subunit $BASE/logs/old/testr_results.html
|
||||
|
||||
Reference in New Issue
Block a user