mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
b9cf7a833f
This moves most of the work from run-tests.sh to test-js.cpp. This way, we have a lot more control over how the test suite runs, as well as how it outputs. This should result in some cool functionality! This commit also refactors test-common.js to mimic the jest library. This should allow tests to be much more expressive :)
36 lines
1.4 KiB
CMake
36 lines
1.4 KiB
CMake
file(GLOB CMD_SOURCES "*.cpp")
|
|
list(APPEND SPECIAL_TARGETS "test" "install")
|
|
|
|
foreach(CMD_SRC ${CMD_SOURCES})
|
|
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
|
|
if (CMD_NAME IN_LIST SPECIAL_TARGETS)
|
|
add_executable("${CMD_NAME}-bin" ${CMD_SRC})
|
|
target_link_libraries("${CMD_NAME}-bin" LibCore)
|
|
install(TARGETS "${CMD_NAME}-bin" RUNTIME DESTINATION bin)
|
|
install(CODE "execute_process(COMMAND mv ${CMD_NAME}-bin ${CMD_NAME} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)")
|
|
else ()
|
|
add_executable(${CMD_NAME} ${CMD_SRC})
|
|
target_link_libraries(${CMD_NAME} LibCore)
|
|
install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin)
|
|
endif()
|
|
endforeach()
|
|
|
|
target_link_libraries(aplay LibAudio)
|
|
target_link_libraries(avol LibAudio)
|
|
target_link_libraries(copy LibGUI)
|
|
target_link_libraries(disasm LibX86)
|
|
target_link_libraries(functrace LibDebug LibX86)
|
|
target_link_libraries(html LibWeb)
|
|
target_link_libraries(js LibJS LibLine)
|
|
target_link_libraries(keymap LibKeyboard)
|
|
target_link_libraries(lspci LibPCIDB)
|
|
target_link_libraries(man LibMarkdown)
|
|
target_link_libraries(md LibMarkdown)
|
|
target_link_libraries(notify LibGUI)
|
|
target_link_libraries(open LibDesktop)
|
|
target_link_libraries(pape LibGUI)
|
|
target_link_libraries(paste LibGUI)
|
|
target_link_libraries(pro LibProtocol)
|
|
target_link_libraries(test-crypto LibCrypto LibTLS LibLine)
|
|
target_link_libraries(test-js LibJS LibLine LibCore)
|
|
target_link_libraries(tt LibPthread)
|