Reconfigure external project (bpf_conformance) location (#372)

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>
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index c34619b..7760a0f 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -65,14 +65,14 @@
     - 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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8343e2c..dbc5a48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,8 @@
         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")
diff --git a/ubpf_plugin/CMakeLists.txt b/ubpf_plugin/CMakeLists.txt
index 518b796..b7f9345 100644
--- a/ubpf_plugin/CMakeLists.txt
+++ b/ubpf_plugin/CMakeLists.txt
@@ -23,13 +23,13 @@
     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()