diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e72c4c9213..6151343a43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,6 +317,7 @@ jobs: cmake -DBUILD_BPF=ON \ -DBUILD_LIBSCAP_MODERN_BPF=ON \ -DBUILD_LIBSCAP_GVISOR=OFF \ + -DENABLE_E2E_TESTS=ON \ ${{ matrix.cmake_opts }} \ -DUSE_BUNDLED_LIBBPF=ON \ .. diff --git a/CMakeLists.txt b/CMakeLists.txt index e510ad020c..c93997fe46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ option(MUSL_OPTIMIZED_BUILD "Enable if you want a musl optimized build" OFF) option(USE_BUNDLED_DRIVER "Use the driver/ subdirectory in the build process (only available in Linux)" ON ) +option(ENABLE_E2E_TESTS "Enable e2e tests" OFF) option(ENABLE_DRIVERS_TESTS "Enable driver tests (bpf, kernel module, modern bpf)" OFF) option(ENABLE_LIBSCAP_TESTS "Enable libscap unit tests" OFF) option(ENABLE_LIBSINSP_E2E_TESTS "Enable libsinsp e2e tests" OFF) @@ -126,7 +127,9 @@ if(CREATE_TEST_TARGETS) # ctest's add_test because it will build the code and output to stdout. add_custom_target(run-unit-tests COMMAND ${CMAKE_MAKE_PROGRAM} run-unit-test-libsinsp) - add_subdirectory(test/e2e) + if(ENABLE_E2E_TESTS) + add_subdirectory(test/e2e) + endif() if(ENABLE_DRIVERS_TESTS) add_subdirectory(test/drivers)