Skip to content

Commit ed0cf83

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 afe6dcd commit ed0cf83

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
@@ -67,15 +67,15 @@ jobs:
6767
run: |
6868
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
6969
-DUSE_LUA=ON -DENABLE_BUILD_PROTOBUF=OFF \
70-
-DENABLE_INTERNAL_TESTS=ON \
70+
-DENABLE_INTERNAL_TESTS=ON -DENABLE_LAPI_TESTS=ON \
7171
-G Ninja -S . -B build
7272
if: ${{ matrix.LUA == 'lua' }}
7373

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

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)