From 80fe49c3238cb8ddb274b984ddf4936294475cf4 Mon Sep 17 00:00:00 2001 From: Ramy Asselin Date: Mon, 12 Jan 2015 14:34:37 -0800 Subject: [PATCH] testr last requires sudo 736d1c987be90fd97ec55f15b6b7560e1f295c29 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 --- functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.sh b/functions.sh index 1f5f83ee..e47ad7ce 100644 --- a/functions.sh +++ b/functions.sh @@ -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