Browse Source

Publish test results as Junit XML

default_compile_flags
vector-of-bool 4 years ago
parent
commit
a6680d60ec
3 changed files with 25 additions and 0 deletions
  1. +21
    -0
      azure-pipelines.yml
  2. +3
    -0
      pytest.ini
  3. +1
    -0
      tools/dds_ci/main.py

+ 21
- 0
azure-pipelines.yml View File

poetry run dds-ci || exit 1 poetry run dds-ci || exit 1
move _build\dds.exe _build\dds-win-x64.exe || exit 1 move _build\dds.exe _build\dds-win-x64.exe || exit 1
displayName: Build and Test displayName: Build and Test
- task: PublishTestResults@2
displayName: Publish Tests
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/pytest-junit.xml'
failTaskOnFailedTests: true
testRunTitle: Windows Tests
- publish: _build\dds-win-x64.exe - publish: _build\dds-win-x64.exe
displayName: Publish displayName: Publish
artifact: dds-win-x64 artifact: dds-win-x64
steps: steps:
- script: make alpine-static-ci - script: make alpine-static-ci
displayName: Build and Test displayName: Build and Test
- task: PublishTestResults@2
displayName: Publish Tests
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/pytest-junit.xml'
failTaskOnFailedTests: true
testRunTitle: Linux Tests
- publish: _build/dds-linux-x64 - publish: _build/dds-linux-x64
displayName: Publish displayName: Publish
artifact: dds-linux-x64 artifact: dds-linux-x64
displayName: Get Python Dependencies displayName: Get Python Dependencies
- script: make macos-ci - script: make macos-ci
displayName: Build and Test displayName: Build and Test
- task: PublishTestResults@2
displayName: Publish Tests
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/pytest-junit.xml'
failTaskOnFailedTests: true
testRunTitle: macOS Tests
- publish: _build/dds-macos-x64 - publish: _build/dds-macos-x64
displayName: Publish displayName: Publish
artifact: dds-macos-x64 artifact: dds-macos-x64

+ 3
- 0
pytest.ini View File

[pytest]
junit_log_passing_tests=true
junit_logging=all

+ 1
- 0
tools/dds_ci/main.py View File

str(args.jobs), str(args.jobs),
f'--basetemp={basetemp}', f'--basetemp={basetemp}',
f'--dds-exe={dds.path}', f'--dds-exe={dds.path}',
f'--junit-xml={paths.BUILD_DIR}/pytest-junit.xml',
str(paths.PROJECT_ROOT / 'tests/'), str(paths.PROJECT_ROOT / 'tests/'),
]) ])



Loading…
Cancel
Save