Skip to content

Commit fe398bf

Browse files
author
Andrew Reusch
authored
Report JUnit test results for all TVM Python tests (#7450)
* Enable JUnit parsing for Python tests * retrigger CI * prefix junit results with FFI type * remove - in junit prefix
1 parent 77d2fe8 commit fe398bf

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Jenkinsfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ stage('Build') {
188188
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
189189
// sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
190190
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
191+
junit "build/pytest-results/*.xml"
191192
}
192193
}
193194
}
@@ -234,6 +235,7 @@ stage('Build') {
234235
timeout(time: max_time, unit: 'MINUTES') {
235236
sh "${docker_run} ${ci_qemu} ./tests/scripts/task_ci_setup.sh"
236237
sh "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh"
238+
junit "build/pytest-results/*.xml"
237239
}
238240
}
239241
}
@@ -251,6 +253,7 @@ stage('Unit Test') {
251253
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_sphinx_precheck.sh"
252254
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_unittest_gpuonly.sh"
253255
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_integration_gpuonly.sh"
256+
junit "build/pytest-results/*.xml"
254257
}
255258
}
256259
}
@@ -265,6 +268,7 @@ stage('Unit Test') {
265268
sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_unittest.sh"
266269
sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_integration.sh"
267270
sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_vta_fsim.sh"
271+
junit "build/pytest-results/*.xml"
268272
}
269273
}
270274
}
@@ -277,6 +281,7 @@ stage('Unit Test') {
277281
timeout(time: max_time, unit: 'MINUTES') {
278282
sh "${docker_run} ${ci_arm} ./tests/scripts/task_ci_setup.sh"
279283
sh "${docker_run} ${ci_arm} ./tests/scripts/task_python_unittest.sh"
284+
junit "build/pytest-results/*.xml"
280285
// sh "${docker_run} ${ci_arm} ./tests/scripts/task_python_integration.sh"
281286
}
282287
}
@@ -305,6 +310,7 @@ stage('Integration Test') {
305310
timeout(time: max_time, unit: 'MINUTES') {
306311
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_ci_setup.sh"
307312
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_topi.sh"
313+
junit "build/pytest-results/*.xml"
308314
}
309315
}
310316
}
@@ -317,6 +323,7 @@ stage('Integration Test') {
317323
timeout(time: max_time, unit: 'MINUTES') {
318324
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_ci_setup.sh"
319325
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_frontend.sh"
326+
junit "build/pytest-results/*.xml"
320327
}
321328
}
322329
}
@@ -329,6 +336,7 @@ stage('Integration Test') {
329336
timeout(time: max_time, unit: 'MINUTES') {
330337
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
331338
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_frontend_cpu.sh"
339+
junit "build/pytest-results/*.xml"
332340
}
333341
}
334342
}

tests/scripts/setup-pytest-env.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ function run_pytest() {
4545
TVM_FFI=${ffi_type} python3 -m pytest \
4646
-o "junit_suite_name=${test_suite_name}-${ffi_type}" \
4747
"--junit-xml=${TVM_PYTEST_RESULT_DIR}/${test_suite_name}-${ffi_type}.xml" \
48+
"--junit-prefix=${ffi_type}" \
4849
"$@"
4950
}

0 commit comments

Comments
 (0)