Skip to content

Commit 4a9abb7

Browse files
committed
cmake: update LUAJIT_BLACKLIST_TESTS
The patch makes LUAJIT_BLACKLIST_TESTS more readable.
1 parent 5c5bc29 commit 4a9abb7

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

tests/capi/CMakeLists.txt

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,30 +109,32 @@ function(create_test)
109109
endif()
110110
endfunction()
111111

112-
# These Lua C functions are unsupported by LuaJIT.
113-
list(APPEND LUAJIT_BLACKLIST_TESTS "luaL_addgsub_test")
114-
list(APPEND LUAJIT_BLACKLIST_TESTS "luaL_bufflen_test")
115-
list(APPEND LUAJIT_BLACKLIST_TESTS "luaL_buffsub_test")
116-
list(APPEND LUAJIT_BLACKLIST_TESTS "luaL_buffaddr_test")
117-
list(APPEND LUAJIT_BLACKLIST_TESTS "lua_stringtonumber_test")
118-
# Disabled because assertion is triggered
119-
# LuaJIT ASSERT lj_bcread.c:123: bcread_byte: buffer read overflow.
120-
list(APPEND LUAJIT_BLACKLIST_TESTS "luaL_dostring_test")
121-
list(APPEND LUAJIT_BLACKLIST_TESTS "luaL_loadbuffer_test")
122-
list(APPEND LUAJIT_BLACKLIST_TESTS "luaL_loadstring_test")
112+
list(APPEND LUAJIT_BLACKLIST_TESTS
113+
# These Lua C functions are unsupported by LuaJIT.
114+
luaL_addgsub_test
115+
luaL_bufflen_test
116+
luaL_buffsub_test
117+
luaL_buffaddr_test
118+
lua_stringtonumber_test
119+
# Disabled because assertion is triggered
120+
# LuaJIT ASSERT lj_bcread.c:123: bcread_byte: buffer read overflow.
121+
luaL_dostring_test
122+
luaL_loadbuffer_test
123+
luaL_loadstring_test
124+
)
123125

124126
file(GLOB tests LIST_DIRECTORIES false ${CMAKE_CURRENT_SOURCE_DIR} *.c *.cc)
125127
foreach(filename ${tests})
126128
get_filename_component(test_name ${filename} NAME_WE)
127129
if (IS_LUAJIT AND (${test_name} IN_LIST LUAJIT_BLACKLIST_TESTS))
128130
continue()
129131
endif ()
130-
if ((${test_name} IN_LIST BLACKLIST_TESTS))
132+
if (${test_name} IN_LIST BLACKLIST_TESTS)
131133
continue()
132134
endif ()
133135
create_test(FILENAME ${test_name}
134-
SOURCES ${filename}
135-
LIBRARIES "")
136+
SOURCES ${filename}
137+
)
136138
endforeach()
137139

138140
include(ProtobufMutator)

0 commit comments

Comments
 (0)