Skip to content

Commit

Permalink
Caputure and assert program output in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Jun 16, 2024
1 parent 5ed5d68 commit da61335
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ jobs:
call_c_from_js=$(pwd)/call_c_from_js
fail_test=$(pwd)/fail_test
xvfb-run "$call_c_from_js"
# Run again and capture its output.
output=$(xvfb-run --auto-servernum --server-num=1 "$call_c_from_js")
[[ "$output" == *"Hello from the backend!"* ]] && true || exit 1
xvfb-run --auto-servernum --server-num=1 "$fail_test" && exit 1 || true
- name: Test Dynamic
if: matrix.arch == 'x64'
Expand All @@ -124,6 +127,8 @@ jobs:
call_c_from_js=$(pwd)/call_c_from_js-dyn
fail_test=$(pwd)/fail_test-dyn
xvfb-run "$call_c_from_js"
output=$(xvfb-run --auto-servernum --server-num=1 "$call_c_from_js")
[[ "$output" == *"Hello from the backend!"* ]] && true || exit 1
xvfb-run --auto-servernum --server-num=1 "$fail_test" && exit 1 || true
- name: Prepare Artifact
run: |
Expand Down

0 comments on commit da61335

Please sign in to comment.