Skip to content

Commit 26c535a

Browse files
committed
cmake: disable Lua API tests by default
The patch introduces an option that enables Lua API tests. The option is disabled by default because necessary dependencies are not installed in OSS Fuzz and thus workflow is failed.
1 parent ff2e683 commit 26c535a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ jobs:
6868
run: |
6969
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
7070
-DUSE_LUA=ON -DENABLE_BUILD_PROTOBUF=OFF \
71-
-DENABLE_INTERNAL_TESTS=ON \
71+
-DENABLE_INTERNAL_TESTS=ON -DENABLE_LAPI_TESTS=ON \
7272
-G Ninja -S . -B build
7373
if: ${{ matrix.LUA == 'lua' }}
7474

7575
- name: Running CMake (LuaJIT -current)
7676
run: |
7777
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
7878
-DUSE_LUAJIT=ON -DENABLE_BUILD_PROTOBUF=OFF \
79-
-DENABLE_INTERNAL_TESTS=ON \
79+
-DENABLE_INTERNAL_TESTS=ON -DENABLE_LAPI_TESTS=ON \
8080
-G Ninja -S . -B build
8181
if: ${{ matrix.LUA == 'luajit' }}
8282

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ option(OSS_FUZZ "Enable support of OSS Fuzz" OFF)
2525
option(ENABLE_BUILD_PROTOBUF "Enable building Protobuf library" ON)
2626
option(ENABLE_BONUS_TESTS "Enable bonus tests" OFF)
2727
option(ENABLE_INTERNAL_TESTS "Enable internal tests" OFF)
28+
option(ENABLE_LAPI_TESTS "Enable Lua API tests" OFF)
2829

2930
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
3031
set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH})

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ is LuaJIT-specific.
4949
- `ENABLE_BUILD_PROTOBUF` enables building Protobuf library, otherwise system
5050
library is used.
5151
- `ENABLE_INTERNAL_TESTS` enables internal tests.
52+
- `ENABLE_LAPI_TESTS` enables Lua API tests.
5253

5354
### Running
5455

tests/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ string(JOIN " " LIBFUZZER_OPTS
1313
)
1414

1515
add_subdirectory(capi)
16-
add_subdirectory(lapi)
16+
if(ENABLE_LAPI_TESTS)
17+
add_subdirectory(lapi)
18+
endif()

0 commit comments

Comments
 (0)