On 01/21/2015 10:13 AM, Lars Vogel
wrote:
Can you try you suggestion
I just set it up. This requires a few more things than what we
identified initially, but it's able to give a green ball and a +1
for Gerrit patches against maintenance branch (see
https://git.eclipse.org/r/#/c/39604/ )
Script is:
# Useful for archive plugin on R4_4_maintenance, where no tests are run
logFilesCount=$(ls tests/*/target/work/data/.metadata/.log | wc -l)
if [ "$logFilesCount" -eq "0" ]; then
mkdir -p tests/mock/target/work/data/.metadata/
echo 'This is a mock .log file because no test run on R4_4_maintenance' > tests/mock/target/work/data/.metadata/.log
fi
junitReportsCount=$(ls tests/*/target/surefire-reports/TEST-*.xml | wc -l)
if [ "$junitReportsCount" -eq "0" ]; then
mkdir -p tests/mock/target/surefire-reports/
echo '<!-- This is a mock JUnit repo file because no test run on R4_4_maintenance-->
<testsuite tests="1">
<testcase classname="dummyMock" name="ASuccessfulTest"/>
</testsuite>' > tests/mock/target/surefire-reports/TEST-dummy.xml
fi