From 67c51b04624ac040ac9369ce7b4e99460f1b8a33 Mon Sep 17 00:00:00 2001 From: Nancy Chauhan Date: Sun, 4 Aug 2019 13:47:01 +0530 Subject: [PATCH 1/4] Jenkinsfile modified to include Tap reporting of or1k-tests' --- .travis/run-or1k-tests.sh | 3 +++ Jenkinsfile | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.travis/run-or1k-tests.sh b/.travis/run-or1k-tests.sh index c86ad76f..67aaf92a 100755 --- a/.travis/run-or1k-tests.sh +++ b/.travis/run-or1k-tests.sh @@ -21,4 +21,7 @@ result=$? if [ $result != 0 ] ; then cat runtests.log fi + +cp $HOME/src/tools/or1k-tests/native/report.tap /src + exit $result diff --git a/Jenkinsfile b/Jenkinsfile index 840cc5ba..26f44e21 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 1") { @@ -28,6 +29,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 2") { @@ -40,6 +42,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 3") { @@ -52,6 +55,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 4") { @@ -64,6 +68,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 5") { @@ -76,6 +81,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 6") { @@ -88,6 +94,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 7") { @@ -100,6 +107,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 8") { @@ -112,6 +120,7 @@ pipeline { } steps { dockerrun() + tapReporting() } } stage("testing 9") { @@ -125,6 +134,7 @@ pipeline { //TODO: remove try/catch once the failing test is fixed (https://github.com/openrisc/mor1kx/issues/71) try { dockerrun() + tapReporting() } catch (Exception e) { echo "Allowed failure" } @@ -138,4 +148,8 @@ pipeline { void dockerrun() { sh 'docker run --rm -v $(pwd):/src -e "JOB=$JOB" -e "SIM=$SIM" -e "PIPELINE=$PIPELINE" -e "EXPECTED_FAILURES=$EXPECTED_FAILURES" -e "EXTRA_CORE_ARGS=$EXTRA_CORE_ARGS" librecores/librecores-ci-openrisc /src/.travis/test.sh' +} + +void tapReporting() { + step([$class: "TapPublisher", testResults: "report.tap"]) } \ No newline at end of file From b9f89439731293155ed90fd6bbcc4a53d7500655 Mon Sep 17 00:00:00 2001 From: Nancy Chauhan Date: Tue, 6 Aug 2019 06:48:39 +0530 Subject: [PATCH 2/4] Added comments --- .travis/run-or1k-tests.sh | 1 + Jenkinsfile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis/run-or1k-tests.sh b/.travis/run-or1k-tests.sh index 67aaf92a..9eebf542 100755 --- a/.travis/run-or1k-tests.sh +++ b/.travis/run-or1k-tests.sh @@ -22,6 +22,7 @@ if [ $result != 0 ] ; then cat runtests.log fi +# copy the report.tap (which has TAP test result) for or1k-tests to /src location cp $HOME/src/tools/or1k-tests/native/report.tap /src exit $result diff --git a/Jenkinsfile b/Jenkinsfile index 26f44e21..a0f49fb1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,6 @@ pipeline { } steps { dockerrun() - tapReporting() } } stage("testing 1") { @@ -146,10 +145,12 @@ pipeline { } } +// data of test.sh is persisted in docker container librecores-ci-openrisc void dockerrun() { sh 'docker run --rm -v $(pwd):/src -e "JOB=$JOB" -e "SIM=$SIM" -e "PIPELINE=$PIPELINE" -e "EXPECTED_FAILURES=$EXPECTED_FAILURES" -e "EXTRA_CORE_ARGS=$EXTRA_CORE_ARGS" librecores/librecores-ci-openrisc /src/.travis/test.sh' } +// TAP Plugin is used which adds the support to TAP test result files to Jenkins which can be seen at https://ci.librecores.org/job/Projects/job/OpenRISC/ void tapReporting() { step([$class: "TapPublisher", testResults: "report.tap"]) } \ No newline at end of file From 320df8efe5a525f3024bab059708e87c5c5827a8 Mon Sep 17 00:00:00 2001 From: Nancy Chauhan Date: Fri, 9 Aug 2019 07:08:57 +0530 Subject: [PATCH 3/4] changing name of report.tap generated i.e it is displayed with unique name for every parallel job --- .travis/run-or1k-tests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis/run-or1k-tests.sh b/.travis/run-or1k-tests.sh index 9eebf542..82601748 100755 --- a/.travis/run-or1k-tests.sh +++ b/.travis/run-or1k-tests.sh @@ -22,7 +22,8 @@ if [ $result != 0 ] ; then cat runtests.log fi -# copy the report.tap (which has TAP test result) for or1k-tests to /src location -cp $HOME/src/tools/or1k-tests/native/report.tap /src +# copy the report.tap (which has TAP test result) for or1k-tests to /src location +mv $HOME/src/tools/or1k-tests/native/report.tap $HOME/src/tools/or1k-tests/native/$SIM$PIPELINE$EXTRA_CORE_ARGS$EXPECTED_FAILURES$EXTRA_CORE_ARGS.tap +cp $HOME/src/tools/or1k-tests/native/$SIM$PIPELINE$EXTRA_CORE_ARGS$EXPECTED_FAILURES$EXTRA_CORE_ARGS.tap /src exit $result From 49d2e29e93d94648e43be4e36823bbb9d29bc5c4 Mon Sep 17 00:00:00 2001 From: Nancy Chauhan Date: Fri, 9 Aug 2019 09:22:36 +0530 Subject: [PATCH 4/4] Revert last commit --- .travis/run-or1k-tests.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis/run-or1k-tests.sh b/.travis/run-or1k-tests.sh index 82601748..9eebf542 100755 --- a/.travis/run-or1k-tests.sh +++ b/.travis/run-or1k-tests.sh @@ -22,8 +22,7 @@ if [ $result != 0 ] ; then cat runtests.log fi -# copy the report.tap (which has TAP test result) for or1k-tests to /src location -mv $HOME/src/tools/or1k-tests/native/report.tap $HOME/src/tools/or1k-tests/native/$SIM$PIPELINE$EXTRA_CORE_ARGS$EXPECTED_FAILURES$EXTRA_CORE_ARGS.tap -cp $HOME/src/tools/or1k-tests/native/$SIM$PIPELINE$EXTRA_CORE_ARGS$EXPECTED_FAILURES$EXTRA_CORE_ARGS.tap /src +# copy the report.tap (which has TAP test result) for or1k-tests to /src location +cp $HOME/src/tools/or1k-tests/native/report.tap /src exit $result