summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibTest/CMakeLists.txt
AgeCommit message (Collapse)Author
2021-07-29Meta/LibTest: Build object libraries for test main filesAndrew Kaster
By using the power of object libraries and $<TARGET_OBJECTS> we can make sure to only build TestMain.cpp and JavaScriptTestRunnerMain.cpp once. Previously we built these cpp files into object files once for every single test executable. This change reduces the number of total compile jobs in a Serenity target build by around 100.
2021-05-08LibTest: Move Crash testing facility from crash.cpp to LibTestBrian Gianforcaro
2021-04-25AK+Userland: Move AK/TestSuite.h into LibTest and rework Tests' CMakeAndrew Kaster
As many macros as possible are moved to Macros.h, while the macros to create a test case are moved to TestCase.h. TestCase is now the only user-facing header for creating a test case. TestSuite and its helpers have moved into a .cpp file. Instead of requiring a TEST_MAIN macro to be instantiated into the test file, a TestMain.cpp file is provided instead that will be linked against each test. This has the side effect that, if we wanted to have test cases split across multiple files, it's as simple as adding them all to the same executable. The test main should be portable to kernel mode as well, so if there's a set of tests that should be run in self-test mode in kernel space, we can accomodate that. A new serenity_test CMake function streamlines adding a new test with arguments for the test source file, subdirectory under /usr/Tests to install the test application and an optional list of libraries to link against the test application. To accomodate future test where the provided TestMain.cpp is not suitable (e.g. test-js), a CUSTOM_MAIN parameter can be passed to the function to not link against the boilerplate main function.
2021-03-15LibELF+LibTest: Fix serenity_install_sources() pathsLinus Groh
Currently we end up with the following: serenity/ AK/ ... Kernel/ ... Libraries/ LibELF/ LibTest/ Userland/ Libraries/ <all other libs> ...
2021-03-01LibTest + test-js: Add initial skelaton of LibTest and migrate code there.Brian Gianforcaro
The test-js reporter is arguably the nicest test runner / reporter that exists in the serenity code base. To the goal of leveling up all the other unit test environments, start a new LibTest library so that we can share code and reporting utilities to make all the test systems look and behave similarly.