Skip to content

Commit

Permalink
Use sudo in tests to avoid iotop limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyskapunk committed Jul 19, 2022
1 parent 8841c09 commit 933c526
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/test_distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:

- name: Run container
run: >
sudo
podman run
--pull always
--detach
Expand All @@ -45,23 +46,24 @@ jobs:
- name: Install in container
run: >
sudo
podman exec
${{ matrix.name }}
bash -c '/recap/tests/install_deps.sh ${{ matrix.name }} && /recap/tests/test_install_recap.sh'
- name: Run Tests in container
run: |
podman exec ${{ matrix.name }} bash -c 'recap --version'
podman exec ${{ matrix.name }} bash -c 'recaplog --version'
podman exec ${{ matrix.name }} /recap/tests/run_recap.sh
podman exec ${{ matrix.name }} bash -c 'ls -tr /var/log/recap/*log | xargs tail -v -n+0'
podman exec ${{ matrix.name }} /recap/tests/run_recaplog.sh
podman exec ${{ matrix.name }} bash -c 'tail -v -n+0 /var/log/recap/recaplog.log'
podman exec ${{ matrix.name }} bash -c 'recap -p list'
podman exec ${{ matrix.name }} bash -c 'recap -p list enabled'
podman exec ${{ matrix.name }} bash -c 'recap -p enable all'
podman exec ${{ matrix.name }} bash -c 'recap -p list enabled'
podman exec ${{ matrix.name }} bash -c 'recap -p list disabled'
podman exec ${{ matrix.name }} bash -c 'recap -p disable all'
podman exec ${{ matrix.name }} bash -c 'recap -p list disabled'
podman exec ${{ matrix.name }} bash -c 'recap -p list enabled'
sudo podman exec ${{ matrix.name }} bash -c 'recap --version'
sudo podman exec ${{ matrix.name }} bash -c 'recaplog --version'
sudo podman exec ${{ matrix.name }} /recap/tests/run_recap.sh
sudo podman exec ${{ matrix.name }} bash -c 'ls -tr /var/log/recap/*log | xargs tail -v -n+0'
sudo podman exec ${{ matrix.name }} /recap/tests/run_recaplog.sh
sudo podman exec ${{ matrix.name }} bash -c 'tail -v -n+0 /var/log/recap/recaplog.log'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p list'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p list enabled'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p enable all'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p list enabled'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p list disabled'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p disable all'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p list disabled'
sudo podman exec ${{ matrix.name }} bash -c 'recap -p list enabled'
6 changes: 2 additions & 4 deletions tests/run_recap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
# Get full path to recap
recap_path=$(type -p recap)

# Insert 'set -e' on line 2 of recap to exit after any failure
sed -i "2iset -e" "${recap_path}";

# Save debugging info and record the status of the recap run
debug_info=$(bash -x "${recap_path}" 2>&1)
# exiting on any failure
debug_info=$(bash -xe "${recap_path}" 2>&1)
stat=$?

# Save the debugging info that occurred right before the cleanup operation
Expand Down

0 comments on commit 933c526

Please sign in to comment.