Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programming exercises: Simplify parsing of test suites in Jenkins setups #9790

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ void postBuildTasks() {
sed -i 's/[^[:print:]\t]/�/g' test-reports/tests-results.xml
sed -i 's/<skipped/<error/g' test-reports/tests-results.xml
sed -i 's/<\\/skipped>/<\\/error>/g' test-reports/tests-results.xml
sed -i 's/<testsuites[^>]*>/<testsuite>/g ; s/<\\/testsuites>/<\\/testsuite>/g' test-reports/tests-results.xml
fi
rm -rf results
mv test-reports results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ void postBuildTasks() {
sh '''
rm -rf results
mkdir results
if [ -e tests/TestResults/TestResults.xml ]
then
sed -i 's/<testsuites[^>]*>/<testsuite>/g ; s/<\\/testsuites>/<\\/testsuite>/g' tests/TestResults/TestResults.xml
fi
cp tests/TestResults/TestResults.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ void postBuildTasks() {
sh '''
rm -rf results
mkdir results
if [ -e test-reports/results.xml ]
then
sed -i 's/<testsuites[^>]*>//g ; s/<\\/testsuites>//g' test-reports/results.xml
fi
cp test-reports/*.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ void postBuildTasks() {
sh '''
rm -rf results
mkdir results
if [ -e junit.xml ]
then
sed -i 's/<testsuites[^>]*>/<testsuite>/g ; s/<\\/testsuites>/<\\/testsuite>/g' junit.xml
fi
cp junit.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ void postBuildTasks() {
sh '''
rm -rf results
mkdir results
if [ -e test-reports/results.xml ]
then
sed -i 's/<testsuites>//g ; s/<\\/testsuites>//g' test-reports/results.xml
fi
cp test-reports/*.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ void postBuildTasks() {
sh '''
rm -rf results
mkdir results
if [ -e tests/testthat/junit.xml ]
then
sed -i 's/<testsuites[^>]*>/<testsuite>/g ; s/<\\/testsuites>/<\\/testsuite>/g' tests/testthat/junit.xml
fi
cp tests/testthat/junit.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ void postBuildTasks() {
sh '''
rm -rf results
mkdir results
if [ -e target/nextest/ci/junit.xml ]
then
sed -i 's/<testsuites[^>]*>/<testsuite>/g ; s/<\\/testsuites>/<\\/testsuite>/g' target/nextest/ci/junit.xml
fi
cp target/nextest/ci/junit.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ void postBuildTasks() {
mkdir results
if [ -e assignment/tests.xml ]
then
sed -i 's/<testsuites>/<testsuite>/g ; s/<\\/testsuites>/<\\/testsuite>/g' assignment/tests.xml
cp assignment/tests.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ void postBuildTasks() {
sh '''
rm -rf results
mkdir results
if [ -e junit.xml ]
then
sed -i 's/<testsuites[^>]*>/<testsuite>/g ; s/<\\/testsuites>/<\\/testsuite>/g' junit.xml
fi
cp junit.xml $WORKSPACE/results/ || true
sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true
'''
Expand Down
Loading