1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

LibTest+Utilities: Print a start message before each test in run-tests

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.
This commit is contained in:
Andrew Kaster 2021-08-18 19:16:23 -06:00 committed by Andreas Kling
parent 6666230d3e
commit 332b29c741
3 changed files with 11 additions and 9 deletions

View file

@ -162,7 +162,7 @@ public:
virtual ~TestRunner() = default;
protected:
virtual void do_run_single_test(const String& test_path) override;
virtual void do_run_single_test(const String& test_path, size_t, size_t) override;
virtual Vector<String> get_test_paths() const override;
virtual JSFileResult run_file_test(const String& test_path);
void print_file_result(const JSFileResult& file_result) const;
@ -230,7 +230,7 @@ inline Optional<JsonValue> get_test_results(JS::Interpreter& interpreter)
return json.value();
}
inline void TestRunner::do_run_single_test(const String& test_path)
inline void TestRunner::do_run_single_test(const String& test_path, size_t, size_t)
{
auto file_result = run_file_test(test_path);
if (!m_print_json)