From 7757fd489e61a21560dfbd6c9fa084c2fb3715a3 Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Mon, 14 Oct 2024 08:19:47 -0700 Subject: [PATCH] Test to see if we can use better names Signed-off-by: Alan Jowett --- .github/workflows/build.yml | 14 +++++++------- CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4003d718f..bcde8eaf3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 77f4be467..1f3a497b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() \ No newline at end of file +endif()