Skip to content
Snippets Groups Projects
Commit 19ff1f3b authored by Pierre Nicolas's avatar Pierre Nicolas :joy:
Browse files

build: fix jenkins

GitLab: #1693
Change-Id: I0a9839e4dd709c21a8baebd65783ad5e54c89376
parent 372f94bd
Branches
Tags
No related merge requests found
...@@ -109,7 +109,13 @@ pipeline { ...@@ -109,7 +109,13 @@ pipeline {
script { script {
sh 'su jenkins -c "cd /jami-client-android && ./compile.sh --test"' sh 'su jenkins -c "cd /jami-client-android && ./compile.sh --test"'
sh 'cd /jami-client-android/ci && ./start_emu_headless.sh' sh 'cd /jami-client-android/ci && ./start_emu_headless.sh'
boolean errorOccurred = false
try{
sh 'su jenkins -c "cd /jami-client-android/ci && ./jami_test.sh"' sh 'su jenkins -c "cd /jami-client-android/ci && ./jami_test.sh"'
} catch (Exception e) {
errorOccurred = true
}
// Archive tests output save it as Jenkins artifact // Archive tests output save it as Jenkins artifact
sh 'cd /jami-client-android/ci/spoon-output && zip -r ../ui-test-output.zip *' sh 'cd /jami-client-android/ci/spoon-output && zip -r ../ui-test-output.zip *'
...@@ -124,6 +130,11 @@ pipeline { ...@@ -124,6 +130,11 @@ pipeline {
reportFiles: 'index.html', reportFiles: 'index.html',
reportName: "Jami UI Test Report" reportName: "Jami UI Test Report"
]) ])
// Mark the build as failed if there was an error
if (errorOccurred) {
error("Pipeline failed due to errors in the test execution.")
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment