Skip to content

Commit

Permalink
Replace old unit test report with datadog upload
Browse files Browse the repository at this point in the history
b/290997541
  • Loading branch information
oxve committed Jul 18, 2023
1 parent ad0859a commit 2130623
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 34 deletions.
21 changes: 7 additions & 14 deletions .github/actions/on_host_test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ runs:
echo "PYTHONPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "TEST_RESULTS_DIR=${GITHUB_WORKSPACE}/unit-test-results" >> $GITHUB_ENV
echo "COVERAGE_DIR=${GITHUB_WORKSPACE}/coverage" >> $GITHUB_ENV
echo "TEST_REPORT_FILE=${GITHUB_WORKSPACE}/${{matrix.platform}}-${{matrix.shard}}" >> $GITHUB_ENV
- name: Run Tests
shell: bash
run: |
Expand Down Expand Up @@ -90,23 +89,17 @@ runs:
if [[ "${{inputs.os}}" == 'windows' ]]; then
python3 ${GITHUB_WORKSPACE}/starboard/tools/testing/test_runner.py --platform ${{matrix.target_platform}} --config ${{matrix.config}} -s ${{matrix.shard}} -r
else
xvfb-run -a --server-args="-screen 0 1920x1080x24i +render +extension GLX -noreset" python3 ${GITHUB_WORKSPACE}/starboard/tools/testing/test_runner.py --platform ${{matrix.target_platform}} --config ${{matrix.config}} -s ${{matrix.shard}} -r ${loader_args} --xml_output_dir=${TEST_RESULTS_DIR}
xvfb-run -a --server-args="-screen 0 1920x1080x24i +render +extension GLX -noreset" python3 ${GITHUB_WORKSPACE}/starboard/tools/testing/test_runner.py --platform ${{matrix.target_platform}} --config ${{matrix.config}} -s ${{matrix.shard}} -r ${loader_args} --xml_output_dir=${TEST_RESULTS_DIR}/${{ matrix.shard }}
fi
fi
- name: Process unit test results
if: failure()
shell: bash
run: |
set -x
echo "Saving unit test report to ${TEST_REPORT_FILE}"
python3 ${GITHUB_WORKSPACE}/starboard/tools/testing/test_report_parser.py ${TEST_RESULTS_DIR} > ${TEST_REPORT_FILE}
- name: Upload unit test report
- name: Archive unit test report
uses: actions/upload-artifact@v3
if: failure()
# TODO: Should only run for unit-tests
if: always()
with:
name: unit-test-reports
path: ${{env.TEST_REPORT_FILE}}
- name: Upload coverage html report
name: unit-test-results
path: ${{env.TEST_RESULTS_DIR}}/
- name: Archive coverage html report
if: success() && matrix.shard == 'coverage'
uses: actions/upload-artifact@v3
with:
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,23 +320,3 @@ jobs:
uses: ./.github/actions/on_host_test
with:
os: linux

# Gets unit test report from on host tests and prints it.
on-host-unit-test-report:
needs: [on-host-test]
permissions: {}
if: failure()
runs-on: ubuntu-latest
steps:
- name: Collect Unit Test Reports
uses: actions/download-artifact@v3
with:
name: unit-test-reports
path: unit-test-reports
- name: Print Unit Test Reports
run: |
for filename in ${GITHUB_WORKSPACE}/unit-test-reports/*; do
basename $filename
cat $filename
echo
done

0 comments on commit 2130623

Please sign in to comment.