Skip to content

Commit

Permalink
Reconfigure external project (bpf_conformance) location (#372)
Browse files Browse the repository at this point in the history
Several dependencies rely on the location of the external
bpf_conformance within the build directory. This patch ensures that we
have the benefit of the external project without having to reconfigure
all users.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
  • Loading branch information
hawkinsw authored Dec 5, 2023
1 parent 3c0c5ac commit bdb7a38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ jobs:
- name: Run the bpf_conformance tests (Windows)
run: |
cd .\build\bin\${{ inputs.build_type }}
$BPF_CONFORMANCE_RUNNER = "..\..\external\bin\${{ inputs.build_type }}\bpf_conformance_runner.exe"
$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\tests --plugin_path ubpf_plugin.exe --plugin_options --jit
& $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\tests --plugin_path ubpf_plugin.exe --plugin_options --interpret
& $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
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ if(UBPF_ENABLE_TESTS)
GIT_SUBMODULES_RECURSE true
GIT_TAG main
INSTALL_COMMAND ""
BINARY_DIR ${CMAKE_BINARY_DIR}/external/)
BINARY_DIR ${CMAKE_BINARY_DIR}/external/bpf_conformance
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/bpf_conformance)
endif()
add_subdirectory("bpf")
add_subdirectory("aarch64_test")
Expand Down
4 changes: 2 additions & 2 deletions ubpf_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ target_link_libraries(
ubpf_settings
)

file(GLOB external_files ${CMAKE_SOURCE_DIR}/external/tests/*.data)
file(GLOB external_files ${CMAKE_SOURCE_DIR}/external/bpf_conformance/tests/*.data)
file(GLOB local_files ${CMAKE_SOURCE_DIR}/tests/*.data)

set(files ${external_files} ${local_files})

if(NOT BPF_CONFORMANCE_RUNNER)
set(BPF_CONFORMANCE_RUNNER ${CMAKE_BINARY_DIR}/external/bin/bpf_conformance_runner)
set(BPF_CONFORMANCE_RUNNER ${CMAKE_BINARY_DIR}/external/bpf_conformance/bin/bpf_conformance_runner)
else()
message(STATUS "Using custom bpf_conformance_runner: ${BPF_CONFORMANCE_RUNNER}")
endif()
Expand Down

0 comments on commit bdb7a38

Please sign in to comment.