@@ -238,6 +238,8 @@ jobs:
238238 shell : cmd
239239
240240 - name : Unit Tests
241+ env :
242+ GTEST_OUTPUT : ' xml:unit_tests_report_gtest.xml'
241243 run : source\x64\${{ matrix.config }}\MRTest.exe
242244
243245 - name : C Unit Tests (old bindings)
@@ -249,24 +251,37 @@ jobs:
249251
250252 - name : C# Unit Tests
251253 if : ${{ env.BUILD_C_SHARP == 'true' }}
252- run : dotnet run --project source/MRDotNet2Test -c ${{ matrix.config }}
254+ run : |
255+ dotnet build source\MRDotNet2Test -c ${{ matrix.config }}
256+ source\x64\${{ matrix.config }}\MRDotNet2Test.exe --result="_report_nunit.xml"
257+ # convert report to JUnit format
258+ [Environment]::CurrentDirectory = $pwd
259+ $xslt = New-Object System.Xml.Xsl.XslCompiledTransform
260+ $xslt.Load("scripts\devops\nunit3-junit.xslt")
261+ $xslt.Transform("_report_nunit.xml", "unit_tests_report_nunit.xml")
253262
254263 - name : Python Sanity Tests
255264 timeout-minutes : 8
256265 working-directory : source\x64\${{ matrix.config }}
257- run : py -3 ..\..\..\scripts\run_python_test_script.py -d '..\test_python'
266+ run : py -3 ..\..\..\scripts\run_python_test_script.py -d '..\test_python' -a ' --junit-xml=../unit_tests_report_pytest.xml'
258267
259268 - name : Python Regression Tests
260269 if : ${{ inputs.internal_build }}
261270 uses : ./.github/actions/python-regression-tests
262271 with :
263272 build_config : ${{ matrix.config }}
264273 mrbind : ${{ inputs.mrbind }}
265- pytest_args : " ${{ env.BUILD_C_SHARP == 'true' && env.PYTEST_C_SHARP_ARGS || '' }} --run-cuda=negative"
274+ pytest_args : " ${{ env.BUILD_C_SHARP == 'true' && env.PYTEST_C_SHARP_ARGS || '' }} --run-cuda=negative --junit-xml=../unit_tests_report_regression.xml "
266275 smoke : ${{ !inputs.full_config_build && matrix.config == 'Debug' }}
267276 test_artifacts_path : ${{ matrix.test_artifacts_path }}
268277 upload_test_artifacts : ${{ inputs.upload_test_artifacts }}
269278
279+ - name : Generate Test Performance Report
280+ continue-on-error : true
281+ run : |
282+ py -3 scripts/junit_to_csv.py unit_tests_report.csv (get-item unit_tests_report_*.xml)
283+ cat unit_tests_report.csv
284+
270285 - name : Delete unwanted files
271286 # Those files should not exist when using CMake.
272287 shell : cmd
0 commit comments