@@ -28,7 +28,7 @@ def runCompileCommand(platform, project, jobName, boolean debug=false, boolean s
28
28
platform. runCommand(this , command)
29
29
}
30
30
31
- def runTestCommand (platform , project )
31
+ def runTestCommand (platform , project , boolean rocmExamples = false )
32
32
{
33
33
String sudo = auxiliary. sudo(platform. jenkinsLabel)
34
34
// String centos = platform.jenkinsLabel.contains('centos') ? '3' : ''
@@ -44,6 +44,34 @@ def runTestCommand (platform, project)
44
44
"""
45
45
46
46
platform. runCommand(this , command)
47
+ // ROCM Examples
48
+ if (rocmExamples){
49
+ String buildString = " "
50
+ if (platform. os. contains(" ubuntu" )){
51
+ buildString + = " sudo dpkg -i *.deb"
52
+ }
53
+ else {
54
+ buildString + = " sudo rpm -i *.rpm"
55
+ }
56
+ testCommand = """ #!/usr/bin/env bash
57
+ set -ex
58
+ cd ${ project.paths.project_build_prefix} /build/release/package
59
+ ${ buildString}
60
+ cd ../../..
61
+ testDirs=("Libraries/rocRAND")
62
+ git clone https://github.com/ROCm/rocm-examples.git
63
+ rocm_examples_dir=\$ (readlink -f rocm-examples)
64
+ for testDir in \$ {testDirs[@]}; do
65
+ cd \$ {rocm_examples_dir}/\$ {testDir}
66
+ cmake -S . -B build
67
+ cmake --build build
68
+ cd ./build
69
+ ctest --output-on-failure
70
+ done
71
+ """
72
+ platform. runCommand(this , testCommand, " ROCM Examples" )
73
+
74
+ }
47
75
}
48
76
49
77
def runPackageCommand (platform , project )
0 commit comments