Skip to content

Commit

Permalink
test: run one test only
Browse files Browse the repository at this point in the history
Temporary patch to execute one test, I'm working on.

Signed-off-by: Mariusz Tkaczyk <[email protected]>
  • Loading branch information
mtkaczyk committed Nov 29, 2024
1 parent 4447238 commit a630824
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/tools/run_mdadm_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ sudo make -j$(nproc)
sudo make install
sudo mdadm -Ss
sudo ./test setup
sudo ./test --skip-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going
# Use this to minimalize testing time for CI improvements.
sudo ./test --tests=00createnames
#sudo ./test --skip-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going
ret=$?
sudo ./test cleanup
exit $ret
17 changes: 17 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- '*.h'
- 'tests/*'
- 'test'
- '.github/*'
- '.github/workflows/*'
- '.github/tools/*'
jobs:
upstream_tests:
if: ${{ github.repository == 'md-raid-utilities/mdadm' }}
Expand All @@ -31,23 +34,37 @@ jobs:
vagrant halt
vagrant status
vagrant up
- name: 'Run tests'
id: testing
continue-on-error: true
run: |
cd ..
vagrant ssh -c "cd /home/vagrant/host/mdadm && .github/tools/run_mdadm_tests.sh"
- name: 'Copy logs to host machine'
if: ${{ steps.testing.outcome == 'failure' }}
run: |
cd ..
vagrant ssh -c "sudo mkdir -p /home/vagrant/host/logs && sudo mv /var/tmp/*.log /home/vagrant/host/logs"
- name: "Save artifacts"
if: ${{ steps.testing.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: "Logs from failed tests"
path: /home/ci/actions-runner/_work/mdadm/logs/*.log

- name: "Clean logs"
if: ${{ steps.testing.outcome == 'failure' }}
run: |
cd ..
sudo rm /home/ci/actions-runner/_work/mdadm/logs/*.log
- name: "Set failed"
if: ${{ steps.testing.outcome == 'failure' }}
run: exit 1

cleanup:
runs-on: self-hosted
needs: [upstream_tests]
Expand Down

0 comments on commit a630824

Please sign in to comment.