Skip to content

Commit

Permalink
Use -T 1 in integration test, use if-else for report files
Browse files Browse the repository at this point in the history
  • Loading branch information
definite committed Mar 27, 2017
1 parent 9b5cc58 commit b9a1d5b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Jenkinsfile
Expand Up @@ -161,7 +161,7 @@ void integrationTests(String appserver) {
xvfb {
withPorts {
// Run the maven build
sh """./run-clean.sh ./mvnw -e install \
sh """./run-clean.sh ./mvnw -e -T 1 install \
--batch-mode \
--settings .travis-settings.xml \
-Danimal.sniffer.skip=true \
Expand Down Expand Up @@ -212,7 +212,10 @@ void withPorts(Closure wrapped) {
void setJUnitPrefix(prefix, files) {
// add prefix to qualified classname
def reportFiles = findFiles glob: "**/${files}"
assert reportFiles.size() > 0 : "Failed to find JUnit report files **/${files}"
sh "sed -i \"s/\\(<testcase .*classname=['\\\"]\\)\\([a-z]\\)/\\1${prefix.toUpperCase()}.\\2/g\" ${reportFiles.join(" ")}"
if (reportFiles.size() > 0){
sh "sed -i \"s/\\(<testcase .*classname=['\\\"]\\)\\([a-z]\\)/\\1${prefix.toUpperCase()}.\\2/g\" ${reportFiles.join(" ")}"
}else{
echo "[WARNING] Failed to find JUnit report files **/${files}"
}
}

0 comments on commit b9a1d5b

Please sign in to comment.