From 9ab274d3e6d056ed9da09f194ffc0119b423b0e0 Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Wed, 30 Aug 2023 14:52:38 -0700 Subject: [PATCH] ci: junit reporter adjustments (#3324) --- .circleci/config.yml | 7 +++++++ .mocharc.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 320a9a8125..3aeef699a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -129,6 +129,13 @@ jobs: libgtk-3-0 \ libgbm1 - run-slow-tests + - run: + when: always # the report is generated on pass or fail + name: Make test report paths relative + command: | + if [ -e ./reports/out/test_output.xml ]; then + sed -i.bak "s|`pwd`/||g" ./reports/out/test_output.xml + fi - store_test_results: path: ./reports/ diff --git a/.mocharc.js b/.mocharc.js index b365b23201..b8046fe9da 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -31,7 +31,7 @@ if (args.length === 0) { const reporterConfig = process.env.CI ? { reporter: 'mocha-junit-reporter', - 'reporter-option': ['mochaFile=./reports/test_output.xml'], + 'reporter-option': ['mochaFile=./reports/out/test_output.xml'], } : {};