misc,tests: Add Pyunit tests to CI GitHub Action Workflow
Due to an oversight, the PyUnit tests were not being run as part of the gem5 CI tests. This was because they are located in "tests/pyunit" instead of "tests/gem5", where the CI GitHub Action workflow searched for tests to run and where all other tests reside. This adds the Pyunit tests as a seperate job in the CI GitHub Action's workflow. Change-Id: I63d93571fde11c19bf3d281c034eddf4b455ae4e
This commit is contained in:
39
.github/workflows/ci-tests.yaml
vendored
39
.github/workflows/ci-tests.yaml
vendored
@@ -184,12 +184,49 @@ jobs:
|
||||
path: tests/testing-results
|
||||
retention-days: 30
|
||||
|
||||
pyunit:
|
||||
runs-on: [self-hosted, linux, x64]
|
||||
if: github.event.pull_request.draft == false
|
||||
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest
|
||||
needs: [pre-commit, check-for-change-id, testlib-quick-gem5-builds]
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
|
||||
# Checkout the repository then download the builds.
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ci-tests-${{ github.run_number }}-testlib-quick-all-gem5-builds
|
||||
|
||||
# Check that the gem5 binaries exist and are executable.
|
||||
- name: Chmod gem5.{opt,debug,fast} to be executable
|
||||
run: |
|
||||
find . -name "gem5.opt" -exec chmod u+x {} \;
|
||||
find . -name "gem5.debug" -exec chmod u+x {} \;
|
||||
find . -name "gem5.fast" -exec chmod u+x {} \;
|
||||
|
||||
# Run the pyunit tests.
|
||||
# Note: these are all quick tests.
|
||||
- name: Run The pyunit tests
|
||||
id: run-tests
|
||||
working-directory: ${{ github.workspace }}/tests
|
||||
run: ./main.py run --skip-build -vv -j$(nproc) pyunit
|
||||
|
||||
# Upload the tests/testing-results directory as an artifact.
|
||||
- name: Upload pyunit test results
|
||||
if: success() || failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ci-tests-run-${{ github.run_number }}-attempt-${{ github.run_attempt }}-pyunit-status-${{ steps.run-tests.outcome }}-output
|
||||
path: tests/testing-results
|
||||
retention-days: 30
|
||||
|
||||
testlib-quick:
|
||||
# It is 'testlib-quick' which needs to pass for the pull request to be
|
||||
# merged. The 'testlib-quick-execution' is a matrix job which runs all the
|
||||
# the testlib quick tests. This job is therefore a stub which will pass if
|
||||
# all the testlib-quick-execution jobs pass.
|
||||
runs-on: ubuntu-latest
|
||||
needs: testlib-quick-execution
|
||||
needs: [testlib-quick-execution, pyunit]
|
||||
steps:
|
||||
- run: echo "This job's status is ${{ job.status }}."
|
||||
|
||||
Reference in New Issue
Block a user