Add timeout for tests stage (#2660)

* Add timeout for tests stage

* Update Jenkinsfile
This commit is contained in:
arjun-raj-kuppala
2022-05-05 11:56:09 +05:30
committed by GitHub
parent b0f3b08ad8
commit dd4e1f23c2
+26 -24
View File
@@ -51,17 +51,19 @@ def hipBuildTest(String backendLabel) {
""" """
} }
} }
stage('HIP Unit Tests - HIT framework') { timeout(time: 1, unit: 'HOURS') {
dir("${WORKSPACE}/hipamd/build") { stage('HIP Unit Tests - HIT framework') {
sh """#!/usr/bin/env bash dir("${WORKSPACE}/hipamd/build") {
set -x sh """#!/usr/bin/env bash
# Check if backend label contains string "amd" or backend host is a server with amd gpu set -x
if [[ $backendLabel =~ amd ]]; then # Check if backend label contains string "amd" or backend host is a server with amd gpu
LLVM_PATH=/opt/rocm/llvm ctest -E 'cooperative_streams_least_capacity.tst|cooperative_streams_half_capacity.tst|cooperative_streams_full_capacity.tst|grid_group_data_sharing.tst' if [[ $backendLabel =~ amd ]]; then
else LLVM_PATH=/opt/rocm/llvm ctest -E 'cooperative_streams_least_capacity.tst|cooperative_streams_half_capacity.tst|cooperative_streams_full_capacity.tst|grid_group_data_sharing.tst'
make test else
fi make test
""" fi
"""
}
} }
} }
stage("Build - Catch2 framework") { stage("Build - Catch2 framework") {
@@ -80,9 +82,7 @@ def hipBuildTest(String backendLabel) {
export HIP_RUNTIME=cuda export HIP_RUNTIME=cuda
cmake -DHIP_CATCH_TEST=1 -DHIP_PATH=\$PWD/install -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install .. cmake -DHIP_CATCH_TEST=1 -DHIP_PATH=\$PWD/install -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
fi fi
make install -j\$(nproc) make install -j\$(nproc)
if [[ $backendLabel =~ amd ]]; then if [[ $backendLabel =~ amd ]]; then
make build_tests -j\$(nproc) make build_tests -j\$(nproc)
else else
@@ -91,17 +91,19 @@ def hipBuildTest(String backendLabel) {
""" """
} }
} }
stage('HIP Unit Tests - Catch2 framework') { timeout(time: 1, unit: 'HOURS') {
dir("${WORKSPACE}/hipamd/build") { stage('HIP Unit Tests - Catch2 framework') {
sh """#!/usr/bin/env bash dir("${WORKSPACE}/hipamd/build") {
set -x sh """#!/usr/bin/env bash
# Check if backend label contains string "amd" or backend host is a server with amd gpu set -x
if [[ $backendLabel =~ amd ]]; then # Check if backend label contains string "amd" or backend host is a server with amd gpu
LLVM_PATH=/opt/rocm/llvm ctest -E 'Unit_hipGraphChildGraphNodeGetGraph_Functional|Unit_hipGraphExecMemcpyNodeSetParamsFromSymbol_Negative' if [[ $backendLabel =~ amd ]]; then
else LLVM_PATH=/opt/rocm/llvm ctest -E 'Unit_hipGraphChildGraphNodeGetGraph_Functional|Unit_hipGraphExecMemcpyNodeSetParamsFromSymbol_Negative'
make test else
fi make test
""" fi
"""
}
} }
} }
} }