diff --git a/Jenkinsfile b/Jenkinsfile index b1d6e0a39..9fd1d5e3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,65 +76,23 @@ rocBLASCI: { platform, project-> - def command - - if(platform.jenkinsLabel.contains('centos') || platform.jenkinsLabel.contains('sles')) - { - if(auxiliary.isJobStartedByTimer()) - { - command = """#!/usr/bin/env bash - set -x - cd ${project.paths.project_build_prefix}/build/release/clients/staging - LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG sudo ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=*nightly*-*known_bug* #--gtest_filter=*nightly* - """ - - platform.runCommand(this, command) - junit "${project.paths.project_build_prefix}/build/release/clients/staging/*.xml" - } - else - { - command = """#!/usr/bin/env bash - set -x - cd ${project.paths.project_build_prefix}/build/release/clients/staging - LD_LIBRARY_PATH=/opt/rocm/hcc/lib ./example-sscal - LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG sudo ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=*quick*:*pre_checkin*-*known_bug* #--gtest_filter=*checkin* - """ + String sudo = auxiliary.sudo(platform.jenkinsLabel) + def gfilter = auxiliary.isJobStartedByTimer() ? "*nightly*" : "*quick*:*pre_checkin*" - platform.runCommand(this, command) - junit "${project.paths.project_build_prefix}/build/release/clients/staging/*.xml" - } - } - else - { - if(auxiliary.isJobStartedByTimer()) - { - command = """#!/usr/bin/env bash + def command = """#!/usr/bin/env bash set -x cd ${project.paths.project_build_prefix}/build/release/clients/staging - LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=*nightly*-*known_bug* #--gtest_filter=*nightly* + ${sudo} LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=${gfilter}-*known_bug* """ - platform.runCommand(this, command) - junit "${project.paths.project_build_prefix}/build/release/clients/staging/*.xml" - } - else - { - command = """#!/usr/bin/env bash - set -x - cd ${project.paths.project_build_prefix}/build/release/clients/staging - LD_LIBRARY_PATH=/opt/rocm/hcc/lib ./example-sscal - LD_LIBRARY_PATH=/opt/rocm/hcc/lib GTEST_LISTENER=NO_PASS_LINE_IN_LOG ./rocblas-test --gtest_output=xml --gtest_color=yes --gtest_filter=*quick*:*pre_checkin*-*known_bug* #--gtest_filter=*checkin* - """ - - platform.runCommand(this, command) - junit "${project.paths.project_build_prefix}/build/release/clients/staging/*.xml" - } - } + platform.runCommand(this, command) + junit "${project.paths.project_build_prefix}/build/release/clients/staging/*.xml" } def packageCommand = { platform, project-> + String sudo = auxiliary.sudo(platform.jenkinsLabel) def command @@ -143,10 +101,10 @@ rocBLASCI: command = """ set -x cd ${project.paths.project_build_prefix}/build/release - make package - mkdir -p package - mv *.rpm package/ - rpm -qlp package/*.rpm + ${sudo} make package + ${sudo} mkdir -p package + ${sudo} mv *.rpm package/ + ${sudo} rpm -qlp package/*.rpm """ platform.runCommand(this, command)