Skip to content

Commit da5d9fb

Browse files
committed
[cpullvm] Run full suite of tests, dump to xml logs
With automerge now enabled, we have had more consistent failures, even in Linux x86 builds. And, we've now seen failures that have been masked by other failures since we stop after the first one. So let's try what seems to be done in ATfE and use lit's `--ignore-fail` and dump all results into xml. A few things to note: 1. Windows builds are not impacted by this--they will still fail at the first error. We don't have QEMU testing enabled there, so we're really only running the lit tests anyway, so I don't think this is as large of an issue. We can re-evaluate this as needed. 2. We might need to think about how this works for ex: PRs. As-is, if there are failures I *think* the precheckin build will still succeed. So either we need an extra step, or people need to be diligent about checking the test reports. 3. I'm also not sure how this will work with eld? Given that its lit tests are split with different defaults. There might be some work needed to make this work well. Note that the code added here is from or is derived from ATfE. All license/copyright info we already have in the modified files should already be correct/appropriate. Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
1 parent cb878ed commit da5d9fb

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/native-runtime-nightly.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,10 @@ jobs:
104104
- name: Test
105105
if: matrix.test_script != ''
106106
run: ./qualcomm-software/scripts/${{ matrix.test_script }}
107+
108+
- name: Upload test results
109+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
110+
if: always()
111+
with:
112+
name: test-results-${{ matrix.build_script }}-${{ matrix.target_os }}
113+
path: build/**/lit_results.junit.xml

.github/workflows/nightly.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ jobs:
6262
- name: Test
6363
run: ./qualcomm-software/scripts/test.sh
6464

65+
- name: Upload test results
66+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
67+
if: always()
68+
with:
69+
name: test-results-build.sh-Linux-x86
70+
path: build/**/lit_results.junit.xml
71+
6572
build-and-test:
6673
if: github.repository == 'qualcomm/cpullvm-toolchain'
6774
name: ${{ matrix.build_script }} on ${{ matrix.target_os }}
@@ -142,3 +149,10 @@ jobs:
142149
- name: Test
143150
if: matrix.test_script != ''
144151
run: ./qualcomm-software/scripts/${{ matrix.test_script }}
152+
153+
- name: Upload test results
154+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
155+
if: always()
156+
with:
157+
name: test-results-${{ matrix.build_script }}-${{ matrix.target_os }}
158+
path: build/**/lit_results.junit.xml

qualcomm-software/scripts/test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ set -ex
1717
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
1818
REPO_ROOT=$( git -C "${SCRIPT_DIR}" rev-parse --show-toplevel )
1919

20+
# If a test fails, lit will ordinarily return a non-zero result,
21+
# which prevents further testing. Setting the --ignore-fail option
22+
# will cause testing to continue, so that CI systems can get a
23+
# full set of results.
24+
# The lit test suites do not generate xml results by default.
25+
# This can be enabled with the --xunit-xml-output option. The file
26+
# written will be relative to the individual suite's build directly,
27+
# so the same name can be used for all files for consistency.
28+
export LIT_OPTS="--ignore-fail --xunit-xml-output=lit_results.junit.xml"
29+
2030
# Run all relevant test targets. This might be too broad eventually,
2131
# but while we have a limited number of variants (and no compiler-rt
2232
# or libc++ testing enabled) we can run everything.

0 commit comments

Comments
 (0)