diff options
author | Linus Groh <mail@linusgroh.de> | 2020-07-07 00:55:50 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-07 10:40:06 +0200 |
commit | bfbd6df8920b191fd9045e9ecb6e41d4b9ae99f4 (patch) | |
tree | 617752427bee5f5c438bccc1fbafa0d8ead0296f /Userland/test-js.cpp | |
parent | 4c845b35ac7ce50661ed36659d2b8e9bdd27a65e (diff) | |
download | serenity-bfbd6df8920b191fd9045e9ecb6e41d4b9ae99f4.zip |
test-js: Show progress in taskbar
This was a nice feature the old run-tests.sh script had - let's add it
to test-js as well! :^)
Diffstat (limited to 'Userland/test-js.cpp')
-rw-r--r-- | Userland/test-js.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Userland/test-js.cpp b/Userland/test-js.cpp index 8be43022fb..6aadc57268 100644 --- a/Userland/test-js.cpp +++ b/Userland/test-js.cpp @@ -184,8 +184,19 @@ Vector<String> get_test_paths(const String& test_root) void TestRunner::run() { - for (auto& path : get_test_paths(m_test_root)) + size_t progress_counter = 0; + auto test_paths = get_test_paths(m_test_root); + for (auto& path : test_paths) { + ++progress_counter; print_file_result(run_file_test(path)); +#ifdef __serenity__ + fprintf(stderr, "\033]9;%zu;%zu;\033\\", progress_counter, test_paths.size()); +#endif + } + +#ifdef __serenity__ + fprintf(stderr, "\033]9;-1;\033\\"); +#endif print_test_results(); } |