commit 033f8f93acd366ecc8ec6172f48eb27044de410f from: Sergey Bronnikov date: Tue Aug 20 13:43:07 2024 UTC cmake: introduce an option ENABLE_INTERNAL_TESTS The patch introduce an option ENABLE_INTERNAL_TESTS, it is disabled by default. Follows up commit 2ec5436e90f1 ("libluamut: initial version"). commit - 3ddc43f3df39a4ef61a4a9e916809c3a5293c184 commit + 033f8f93acd366ecc8ec6172f48eb27044de410f blob - 210fa70f914175942b0b50e1a24d7d89256957d2 blob + 61a3970acefd1ae74a66767dc23827c60184b1c1 --- .github/workflows/test.yaml +++ .github/workflows/test.yaml @@ -59,6 +59,7 @@ jobs: run: | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ -DUSE_LUA=ON -DENABLE_BUILD_PROTOBUF=OFF \ + -DENABLE_INTERNAL_TESTS=ON \ -G Ninja -S . -B build if: ${{ matrix.LUA == 'lua' }} @@ -66,6 +67,7 @@ jobs: run: | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ -DUSE_LUAJIT=ON -DENABLE_BUILD_PROTOBUF=OFF \ + -DENABLE_INTERNAL_TESTS=ON \ -G Ninja -S . -B build if: ${{ matrix.LUA == 'luajit' }} blob - b31d8b458fd75313e13770a17a3803989008f0d4 blob + 18a14cb05dd404bd4bad64600a1c0df56d99b754 --- CMakeLists.txt +++ CMakeLists.txt @@ -24,6 +24,7 @@ option(ENABLE_LUAJIT_RANDOM_RA "Enable randomness in a option(OSS_FUZZ "Enable support of OSS Fuzz" OFF) option(ENABLE_BUILD_PROTOBUF "Enable building Protobuf library" ON) option(ENABLE_BONUS_TESTS "Enable bonus tests" OFF) +option(ENABLE_INTERNAL_TESTS "Enable internal tests" OFF) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH}) blob - 51f28cf238f278c5d1a9482b57bdf1b1ce6f1500 blob + 77f0284ae4397b8141af6198ee1f2de1a7afb2b5 --- README.md +++ README.md @@ -40,6 +40,7 @@ is LuaJIT-specific. - `OSS_FUZZ` enables support of OSS Fuzz. - `ENABLE_BUILD_PROTOBUF` enables building Protobuf library, otherwise system library is used. +- `ENABLE_INTERNAL_TESTS` enables internal tests. ### Running blob - cfd54a6ca3bd3bac958432ecfd56d6e2efad05f7 blob + 0b6888e7361a3b159d75cec171e51322f53c74b8 --- libluamut/CMakeLists.txt +++ libluamut/CMakeLists.txt @@ -21,4 +21,6 @@ target_include_directories(${LIB_LUA_CROSSOVER} PRIVAT target_compile_options(${LIB_LUA_CROSSOVER} PRIVATE ${CFLAGS}) add_dependencies(${LIB_LUA_CROSSOVER} ${LUA_TARGET}) -add_subdirectory(tests) +if (ENABLE_INTERNAL_TESTS) + add_subdirectory(tests) +endif()