diff --git a/.github/workflows/native-runtime-nightly.yml b/.github/workflows/native-runtime-nightly.yml index 36615ce8332e..7c74a772f4fd 100644 --- a/.github/workflows/native-runtime-nightly.yml +++ b/.github/workflows/native-runtime-nightly.yml @@ -104,3 +104,10 @@ jobs: - name: Test if: matrix.test_script != '' run: ./qualcomm-software/scripts/${{ matrix.test_script }} + + - name: Upload test results + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: always() + with: + name: test-results-${{ matrix.build_script }}-${{ matrix.target_os }} + path: build/**/lit_results.junit.xml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6afbaad780fe..302a52931d4b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -62,6 +62,13 @@ jobs: - name: Test run: ./qualcomm-software/scripts/test.sh + - name: Upload test results + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: always() + with: + name: test-results-build.sh-Linux-x86 + path: build/**/lit_results.junit.xml + build-and-test: if: github.repository == 'qualcomm/cpullvm-toolchain' name: ${{ matrix.build_script }} on ${{ matrix.target_os }} @@ -142,3 +149,10 @@ jobs: - name: Test if: matrix.test_script != '' run: ./qualcomm-software/scripts/${{ matrix.test_script }} + + - name: Upload test results + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: always() + with: + name: test-results-${{ matrix.build_script }}-${{ matrix.target_os }} + path: build/**/lit_results.junit.xml diff --git a/qualcomm-software/scripts/test.sh b/qualcomm-software/scripts/test.sh index 53749202d49a..8208c5517440 100755 --- a/qualcomm-software/scripts/test.sh +++ b/qualcomm-software/scripts/test.sh @@ -17,6 +17,16 @@ set -ex SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) REPO_ROOT=$( git -C "${SCRIPT_DIR}" rev-parse --show-toplevel ) +# If a test fails, lit will ordinarily return a non-zero result, +# which prevents further testing. Setting the --ignore-fail option +# will cause testing to continue, so that CI systems can get a +# full set of results. +# The lit test suites do not generate xml results by default. +# This can be enabled with the --xunit-xml-output option. The file +# written will be relative to the individual suite's build directly, +# so the same name can be used for all files for consistency. +export LIT_OPTS="--ignore-fail --xunit-xml-output=lit_results.junit.xml" + # Run all relevant test targets. This might be too broad eventually, # but while we have a limited number of variants (and no compiler-rt # or libc++ testing enabled) we can run everything.