diff options
author | Matthew Olsson <matthewcolsson@gmail.com> | 2020-07-04 11:50:24 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-06 23:40:35 +0200 |
commit | cf537311e490ac0e1f9709a26b9cf2bf5aa6377d (patch) | |
tree | 14bdd6b16a00fd692fe6775840b0170136887901 /Userland | |
parent | 26acc8ba882736395575332be1f23d1edcea4607 (diff) | |
download | serenity-cf537311e490ac0e1f9709a26b9cf2bf5aa6377d.zip |
test-js: Remove run-tests.sh
The shell script is no longer necessary -- simply run "test-js" from
inside Serenity, or $SERENITY_ROOT/Build/Meta/Lagom/test-js from the
host.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/test-js.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Userland/test-js.cpp b/Userland/test-js.cpp index aff348a07c..c9f6c86e2f 100644 --- a/Userland/test-js.cpp +++ b/Userland/test-js.cpp @@ -515,9 +515,18 @@ void TestRunner::print_test_results() const printf("Time: %-.3fs\n\n", m_end_time - m_start_time); } -int main(int argc, char** argv) +int main(int, char**) { - ASSERT(argc == 2); - TestRunner(argv[1]).run(); +#ifdef __serenity__ + TestRunner("/home/anon/js-tests").run(); +#else + char* serenity_root = getenv("SERENITY_ROOT"); + if (!serenity_root) { + printf("test-js requires the SERENITY_ROOT environment variable to be set"); + return 1; + } + TestRunner(String::format("%s/Libraries/LibJS/Tests", serenity_root)).run(); +#endif + return 0; } |