1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:57:46 +00:00

Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR

This commit is contained in:
Panagiotis Vasilopoulos 2021-04-20 03:51:04 +03:00 committed by Linus Groh
parent 3f5c934ea6
commit e45e0eeb47
33 changed files with 69 additions and 69 deletions

View file

@ -744,12 +744,12 @@ int main(int argc, char** argv)
#ifdef __serenity__
test_root = "/home/anon/js-tests";
#else
char* serenity_root = getenv("SERENITY_ROOT");
if (!serenity_root) {
warnln("No test root given, test-js requires the SERENITY_ROOT environment variable to be set");
char* serenity_source_dir = getenv("SERENITY_SOURCE_DIR");
if (!serenity_source_dir) {
warnln("No test root given, test-js requires the SERENITY_SOURCE_DIR environment variable to be set");
return 1;
}
test_root = String::formatted("{}/Userland/Libraries/LibJS/Tests", serenity_root);
test_root = String::formatted("{}/Userland/Libraries/LibJS/Tests", serenity_source_dir);
#endif
}
if (!Core::File::is_directory(test_root)) {

View file

@ -676,12 +676,12 @@ int main(int argc, char** argv)
#ifdef __serenity__
TestRunner("/home/anon/web-tests", "/home/anon/js-tests", view, print_times).run();
#else
char* serenity_root = getenv("SERENITY_ROOT");
if (!serenity_root) {
printf("test-web requires the SERENITY_ROOT environment variable to be set");
char* serenity_source_dir = getenv("SERENITY_SOURCE_DIR");
if (!serenity_source_dir) {
printf("test-web requires the SERENITY_SOURCE_DIR environment variable to be set");
return 1;
}
TestRunner(String::format("%s/Userland/Libraries/LibWeb/Tests", serenity_root), String::format("%s/Userland/Libraries/LibJS/Tests", serenity_root), view, print_times).run();
TestRunner(String::format("%s/Userland/Libraries/LibWeb/Tests", serenity_source_dir), String::format("%s/Userland/Libraries/LibJS/Tests", serenity_source_dir), view, print_times).run();
#endif
return 0;
}