summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibTest
AgeCommit message (Collapse)Author
2021-06-04LibTest: Add --json flag to JS test runnerLinus Groh
This will not show the colorful human-readable file results and final test results summary but instead output a JSON blob containing all test information, which can then be processed by other programs easily.
2021-05-30LibTest+test-js: Add back the lost test262 parser test optionAli Mohammad Pur
Fixes #7566.
2021-05-27LibTest: Do not cleanly exit when abort() is calledAli Mohammad Pur
Instead, do the cleanup, remove the signal handler, and abort() again.
2021-05-25LibTest: Use fstatat() to speed up iterate_directory_recursively()Andreas Kling
Employ the same technique as SpaceAnalyzer to avoid doing full path resolution in the kernel over an over. Starting each path resolution from the base of the directory iterator (using its fd) is significantly faster and reduces test-js runtime by ~3%.
2021-05-18LibJS+LibTest: Move out the test-js test runner into LibTestAli Mohammad Pur
2021-05-08LibTest: Convert Crash test runner to outln(..)Brian Gianforcaro
2021-05-08LibTest: Expose new EXPECT_CRASH(..) macro for unit test assertionsBrian Gianforcaro
Utilize the Crash type we imported into LibTest to support testing of crash scenarios when testing all other components.
2021-05-08LibTest: Move Crash testing facility from crash.cpp to LibTestBrian Gianforcaro
2021-04-29LibTest: Add EXPECT_NE(..) test assertion.Brian Gianforcaro
2021-04-27LibTest: Add FAIL() macro allow tests to force failure with message.Brian 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-04-23Userland: Use mattco@serenityos.org for my copyright headersMatthew Olsson
2021-04-22Everywhere: Use linusg@serenityos.org for my copyright headersLinus Groh
2021-04-22Everywhere: Use bgianf@serenityos.org for my copyright attributionBrian Gianforcaro
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-24LibTest: Add Test::CountsLinus Groh
This is the JSTestRunnerCounts struct from test-js and test-web (but using unsigned integers - no negative counts). Not all test runners will use all fields, but all will want to keep track of various counts.
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.