Fix subunit collection in functional tests with ostestr>=1.0.0
With the release of os-testr 1.0.0 stestr is used internally and because of that the repository dir and commands to get subunit are different. This commit updates the post-test hook to get the subunit stream if ostestr>=1.0.0 is used. Change-Id: I2cce7f4780ce418398b17a5848def9072372841e
This commit is contained in:
parent
f63bb18003
commit
12552cee70
openstackclient/tests/functional
@ -15,6 +15,14 @@ function generate_testr_results {
|
|||||||
sudo gzip -9 $BASE/logs/testr_results.html
|
sudo gzip -9 $BASE/logs/testr_results.html
|
||||||
sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
|
elif [ -f .stestr/0 ]; then
|
||||||
|
sudo .tox/functional/bin/stestr last --subunit > $WORKSPACE/testrepository.subunit
|
||||||
|
sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
|
||||||
|
sudo .tox/functional/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
|
||||||
|
sudo gzip -9 $BASE/logs/testrepository.subunit
|
||||||
|
sudo gzip -9 $BASE/logs/testr_results.html
|
||||||
|
sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
|
sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,14 @@ function generate_testr_results {
|
|||||||
sudo gzip -9 $BASE/logs/testr_results.html
|
sudo gzip -9 $BASE/logs/testr_results.html
|
||||||
sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
|
elif [ -f .stestr/0 ]; then
|
||||||
|
sudo .tox/functional-tips/bin/stestr last --subunit > $WORKSPACE/testrepository.subunit
|
||||||
|
sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
|
||||||
|
sudo .tox/functional-tips/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
|
||||||
|
sudo gzip -9 $BASE/logs/testrepository.subunit
|
||||||
|
sudo gzip -9 $BASE/logs/testr_results.html
|
||||||
|
sudo chown jenkins:jenkins $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
|
sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user