Skip to content

Commit

Permalink
Check for return code from tests (#326)
Browse files Browse the repository at this point in the history
* Check for return code from tests

Signed-off-by: Alan Jowett <[email protected]>

* Fix MacOS build

Signed-off-by: Alan Jowett <[email protected]>

---------

Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan-Jowett and Alan Jowett authored Aug 7, 2023
1 parent 45e3913 commit dbd6ffb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,13 @@ jobs:
--target test
- name: Generate code coverage report
if: inputs.enable_coverage == true
if: inputs.enable_coverage == true && inputs.platform == 'macos-11'
run: |
mkdir -p coverage
lcov --capture --directory build --include '${{env.GITHUB_WORKSPACE}}/*' --output-file coverage/lcov.info --ignore-errors inconsistent
- name: Generate code coverage report
if: inputs.enable_coverage == true && inputs.platform != 'macos-11'
run: |
mkdir -p coverage
lcov --capture --directory build --include '${{env.GITHUB_WORKSPACE}}/*' --output-file coverage/lcov.info
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,13 @@ jobs:
cd .\build\bin\${{ inputs.build_type }}
$BPF_CONFORMANCE_RUNNER = "..\..\external\bpf_conformance\bin\${{ inputs.build_type }}\bpf_conformance_runner.exe"
& $BPF_CONFORMANCE_RUNNER --test_file_directory ..\tests --plugin_path ubpf_plugin.exe --plugin_options --jit
if ($LastExitCode -ne 0) { throw "Test failed"; }
& $BPF_CONFORMANCE_RUNNER --test_file_directory ..\tests --plugin_path ubpf_plugin.exe --plugin_options --interpret
if ($LastExitCode -ne 0) { throw "Test failed"; }
& $BPF_CONFORMANCE_RUNNER --exclude lock_ --test_file_directory ..\..\external\bpf_conformance\tests --plugin_path ubpf_plugin.exe --plugin_options --jit
if ($LastExitCode -ne 0) { throw "Test failed"; }
& $BPF_CONFORMANCE_RUNNER --exclude lock_ --test_file_directory ..\..\external\bpf_conformance\tests --plugin_path ubpf_plugin.exe --plugin_options --interpret
if ($LastExitCode -ne 0) { throw "Test failed"; }
- name: Generate the TGZ package
run: |
Expand Down

0 comments on commit dbd6ffb

Please sign in to comment.