Skip to content

Commit

Permalink
wip: verify output
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenautumns committed Nov 5, 2024
1 parent e86e70d commit ea26db8
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,37 @@ jobs:
- name: Check CGroup
run: systemd-run --user --scope cat /proc/self/cgroup
- name: Run example ${{ matrix.example }}
run: nix develop --command systemd-run-example-${{ matrix.example }} --duration $DURATION
id: run_step
shell: nix develop --command bash -e {0}
run: systemd-run-example-${{ matrix.example }} --duration $DURATION 2>&1 | tee ./output.log
- name: Verify output
run: |
! grep "ERROR" ./output.log || false
! grep "panic" ./output.log || false
if [ "${{ matrix.example }}" = "hello_part" ]; then
! grep "WARN" ./output.log || false
grep "Received via Sampling Port: CustomMessage" ./output.log ||
{ printf "no custom message received"; exit 1; }
fi
if [ "${{ matrix.example }}" = "fuel_tank" ]; then
! grep "WARN" ./output.log || false
fi
if [ "${{ matrix.example }}" = "ping" ]; then
grep "received valid response" ./output.log ||
{ printf "no valid response received"; exit 1; }
fi
if [ "${{ matrix.example }}" = "dev_random" ]; then
! grep "WARN" ./output.log || false
grep "got some randomness" ./output.log ||
{ printf "missing randomness log info"; exit 1; }
fi
if [ "${{ matrix.example }}" = "ping_queue" ]; then
grep "received valid response" ./output.log ||
{ printf "no valid response received"; exit 1; }
fi
if [ "${{ matrix.example }}" = "redirect_stdio" ]; then
! grep "WARN" ./output.log || false
grep "Terminating partition" ./output.log ||
{ printf "partition didn't terminate as expected"; exit 1; }
fi

0 comments on commit ea26db8

Please sign in to comment.