summaryrefslogtreecommitdiff
path: root/Userland/Utilities/run-tests.cpp
AgeCommit message (Collapse)Author
2023-03-21Everywhere: Use `LibFileSystem` where trivialCameron Youell
2023-03-01LibCore+Everywhere: Remove ArgsParser::add*(char const*&)Ali Mohammad Pur
This is not guaranteed to always work correctly as ArgsParser deals in StringViews and might have a non-properly-null-terminated string as a value. As a bonus, using StringView (and DeprecatedString where necessary) leads to nicer looking code too :^)
2023-02-28Userland+AK: Stop using getopt() for ArgsParserAli Mohammad Pur
This commit moves the implementation of getopt into AK, and converts its API to understand and use StringView instead of char*. Everything else is caught in the crossfire of making Option::accept_value() take a StringView instead of a char const*. With this, we must now pass a Span<StringView> to ArgsParser::parse(), applications using LibMain are unaffected, but anything not using that or taking its own argc/argv has to construct a Vector<StringView> for this method.
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-10-10Everywhere: Replace uses of __serenity__ with AK_OS_SERENITYAndrew Kaster
Now that we have OS macros for essentially every supported OS, let's try to use them everywhere.
2022-07-14LibCore: Replace the ArgsParser option argument setting with an enumTim Schumacher
Replacement conditions for `requires_argument` have been chosen based on what would be most convenient for implementing an eventual optional argument mode.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-29run-tests: Port to LibMainKenneth Myhra
2022-02-16LibCore+Everywhere: Return ErrorOr from ConfigFile factory methodsSam Atkins
I've attempted to handle the errors gracefully where it was clear how to do so, and simple, but a lot of this was just adding `release_value_but_fixme_should_propagate_errors()` in places.
2022-02-05Utilities/run-tests: Add command-line switch to also run "skipped" testsSam Atkins
Among other things, this lets you run flaky tests to check if they are still flaky. :^) This is done in two ways: It makes should_skip_test() always return false; and skips reading and generating the skipped-tests lists since we won't use them.
2022-01-28run-tests: Dump a backtrace for crashed testsAli Mohammad Pur
It only makes sense to see what a crashed test was up to, so generate a backtrace if we can find the coredump and read it.
2022-01-07run-tests: Make reproducing test failures behave closer to selftest modeBrian Gianforcaro
In CI / or local testing when you run `serenity.sh tests`, the system will boot itself in self test mode, and the test runner will be launched by SystemServer. Previously we were setting up settings for that environment in the `SystemServer.ini`. This makes reproducing CI failures a bit confusing, as the system will behavior differently if you run in self-test mode, vs running `run-tests-and-shutdown.sh` or `run-tests` manually in a session. This change moves the settings to `run-tests`, so no matter how you try to run the test runner, it will always behave the same.
2021-11-08LibRegex: Don't push LibRegex's "Error" into the global namespaceAndreas Kling
2021-08-22Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to opennetworkException
This patch brings the ConfigFile helpers for opening lib, app and system configs more inline with the regular ConfigFile::open functions.
2021-08-19LibTest+Utilities: Print a start message before each test in run-testsAndrew Kaster
It can sometimes be difficult to tell from the debug.log and test stdout which test was the last to run before the test runner hangs or exits the QEMU instance unexpectedly. Print out a start message before each test is executed, along with a progress message indicating which test out of how many tests we're about to run.
2021-07-19LibTest/Utilities: Add method for TestRunner to print failed test namesAndrew Kaster
If a test run has a lot of tests in it, and they fill up the terminal buffer, it can be difficult to find out exactly which tests have failed from your large test run. Make TestRunner print out an optional Vector of failed test names at the end of the run, and have run-tests add each failed or crashed test to a Vector it uses for this purpose.
2021-07-14Tests: Change test-filtering mechanismHendiadyoin1
We have a new config argument to add space separated exclude regex' This is separate from "NotTestsPattern", because these are still Tests, although they are not supposed to be run by the runner This also adds the test for a working UserspaceEmulator to the tests run
2021-07-08Utilities/run-tests: Don't use `using enum`Daniel Bertalan
`using enum` statements will only be supported by the upcoming Clang 13 compiler, so the current code can't be built with the almost-ready Clang toolchain yet.
2021-07-04Everywhere: Prefer using "..."sv over StringView { "..." }Gunnar Beutner
2021-06-30run-tests: Update for LexicalPath API changesAndreas Kling
2021-06-30Userland: Unlink file after waiting for child in run-testsAndrew Kaster
TestProcFs expects to be able to stat its stdout and stderr. The new ProcFS implemetnation properly forwards the symlinks for /proc/pid/fd/[1,2] to the temporary file that we had unlinked prior to spawning the process. However, this makes it so that a normal stat on the symlink to that file fails (as expected). Move the unlink to after we've waited on the child, so that we know it won't be trying any funny business with its stdout/stderr anymore.
2021-06-30Base+Utilities: Add run-tests program to run system tests with LibTestAndrew Kaster
This test program heavily pulls from the JavaScriptTestRunner/test-js, but with a twist. Instead of loading JavaScript files into the current process, constructing a JS environment for them, and executing test suites/tests directly, run-tests posix_spawns each test file. Test file stdout is written to a temp file, and only dumped to console if the test fails or the verbose option is passed to the program. Unlike test-js, times are always printed for every test executed for better visibility in CI.