Skip to content

Commit

Permalink
Test to see if we can use better names
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Oct 14, 2024
1 parent 866964d commit 7757fd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
configurations: [Debug, Release]
build_tests: [true, false]
build_tests: [ENABLE_TESTS=true, ENABLE_TESTS=false]
runs-on: ubuntu-latest
env:
# Configuration type to build. For documentation on how build matrices work, see
Expand All @@ -38,15 +38,15 @@ jobs:
- name: Build
run: |
mkdir build
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} -DVERIFIER_ENABLE_TESTS=${{matrix.build_tests}}
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} -DVERIFIER_${{matrix.build_tests}}
cmake --build build -j $(nproc)
- name: Run unit tests
if: matrix.build_tests
if: ${{matrix.build_tests}} == 'ENABLE_TESTS=true'
run: ./tests -d yes

- name: Test for memory leaks
if: matrix.build_tests
if: ${{matrix.build_tests}} == 'ENABLE_TESTS=true'
# Any memory leaks will cause the test to fail
# This BPF program was chosen because it is the largest one in the repo
run: valgrind --leak-check=full --errors-for-leak-kinds=all --show-leak-kinds=all --error-exitcode=1 ./check ebpf-samples/cilium/bpf_xdp_snat_linux_v1.o 2/1
Expand All @@ -55,7 +55,7 @@ jobs:
strategy:
matrix:
configurations: [Debug, Release]
build_tests: [true, false]
build_tests: [ENABLE_TESTS=true, ENABLE_TESTS=false]
runs-on: windows-2022
env:
# Configuration type to build. For documentation on how build matrices work, see
Expand All @@ -70,9 +70,9 @@ jobs:
- name: Build
run: |
mkdir build
cmake -B build -DVERIFIER_ENABLE_TESTS=${{matrix.build_tests}}
cmake -B build -DVERIFIER_${{matrix.build_tests}}
cmake --build build -j $(nproc) --config ${{env.BUILD_CONFIGURATION}}
- name: Run unit tests
if: matrix.build_tests
if: ${{matrix.build_tests}} == 'ENABLE_TESTS=true'
run: ./${{env.BUILD_CONFIGURATION}}/tests -d yes
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,4 @@ target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
target_link_libraries(run_yaml PRIVATE ebpfverifier)

target_link_libraries(conformance_check PRIVATE ebpfverifier)
endif()
endif()

0 comments on commit 7757fd4

Please sign in to comment.