From 67fc81a65a21de9302f8b77799f427f9a480bc83 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 20 Mar 2022 11:38:55 -0700 Subject: [PATCH] Everywhere: Move cpp-tests under /home/anon/Tests --- Base/usr/share/man/man1/cp.md | 12 ++++++------ Base/usr/share/man/man1/rm.md | 4 ++-- Meta/build-root-filesystem.sh | 10 +++++----- Tests/LibCpp/test-cpp-parser.cpp | 2 +- Tests/LibCpp/test-cpp-preprocessor.cpp | 2 +- .../HackStudio/LanguageServers/Cpp/Tests.cpp | 2 +- Userland/Utilities/update-cpp-test-results.cpp | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Base/usr/share/man/man1/cp.md b/Base/usr/share/man/man1/cp.md index 812c1f0f31..77c8515c93 100644 --- a/Base/usr/share/man/man1/cp.md +++ b/Base/usr/share/man/man1/cp.md @@ -25,12 +25,12 @@ If a directory is specified in `source`, the `-R` (recursive) flag is required. ## Examples ```sh -# Copy cpp-tests file and name it cpp-tests-backup -$ cp cpp-tests cpp-tests-backup +# Copy test file and name it test-backup +$ cp test test-backup -# Copy cpp-tests directory and name it cpp-tests-backup -$ cp -R cpp-tests cpp-tests-backup +# Copy tests directory and name it tests-backup +$ cp -R tests tests-backup -# Copy cpp-tests file into existing root -$ cp cpp-tests root +# Copy test file into existing root +$ cp test root ``` diff --git a/Base/usr/share/man/man1/rm.md b/Base/usr/share/man/man1/rm.md index 9800244d1a..219943189a 100644 --- a/Base/usr/share/man/man1/rm.md +++ b/Base/usr/share/man/man1/rm.md @@ -26,6 +26,6 @@ If a directory is specified in `path`, the `-r` (recursive) flag is required. Ot # Remove README.md file $ rm README.md -# Remove cpp-tests directory -$ rm -r cpp-tests +# Remove Tests directory +$ rm -r Tests ``` diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh index 8355ccf460..b7652f1470 100755 --- a/Meta/build-root-filesystem.sh +++ b/Meta/build-root-filesystem.sh @@ -155,14 +155,14 @@ mkdir -p mnt/home/anon mkdir -p mnt/home/anon/Desktop mkdir -p mnt/home/anon/Downloads mkdir -p mnt/home/nona -rm -fr mnt/home/anon/js-tests mnt/home/anon/web-tests mnt/home/anon/cpp-tests mnt/home/anon/wasm-tests -mkdir -p mnt/home/anon/cpp-tests/ +rm -fr mnt/home/anon/js-tests mnt/home/anon/web-tests mnt/home/anon/Tests/cpp-tests mnt/home/anon/wasm-tests +mkdir -p mnt/home/anon/Tests/cpp-tests/ cp "$SERENITY_SOURCE_DIR"/README.md mnt/home/anon/ cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests mnt/home/anon/js-tests cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibWeb/Tests mnt/home/anon/web-tests -cp -r "$SERENITY_SOURCE_DIR"/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests mnt/home/anon/cpp-tests/comprehension -cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCpp/Tests/parser mnt/home/anon/cpp-tests/parser -cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCpp/Tests/preprocessor mnt/home/anon/cpp-tests/preprocessor +cp -r "$SERENITY_SOURCE_DIR"/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests mnt/home/anon/Tests/cpp-tests/comprehension +cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCpp/Tests/parser mnt/home/anon/Tests/cpp-tests/parser +cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCpp/Tests/preprocessor mnt/home/anon/Tests/cpp-tests/preprocessor cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibWasm/Tests mnt/home/anon/wasm-tests cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests/test-common.js mnt/home/anon/wasm-tests cp -r "$SERENITY_SOURCE_DIR"/Userland/Applications/Spreadsheet/Tests mnt/home/anon/spreadsheet-tests diff --git a/Tests/LibCpp/test-cpp-parser.cpp b/Tests/LibCpp/test-cpp-parser.cpp index 8bcbcaa62f..4f0f6ae7da 100644 --- a/Tests/LibCpp/test-cpp-parser.cpp +++ b/Tests/LibCpp/test-cpp-parser.cpp @@ -11,7 +11,7 @@ #include #include -constexpr char TESTS_ROOT_DIR[] = "/home/anon/cpp-tests/parser"; +constexpr char TESTS_ROOT_DIR[] = "/home/anon/Tests/cpp-tests/parser"; static String read_all(String const& path) { diff --git a/Tests/LibCpp/test-cpp-preprocessor.cpp b/Tests/LibCpp/test-cpp-preprocessor.cpp index 925571ff00..75c7724a52 100644 --- a/Tests/LibCpp/test-cpp-preprocessor.cpp +++ b/Tests/LibCpp/test-cpp-preprocessor.cpp @@ -10,7 +10,7 @@ #include #include -constexpr char TESTS_ROOT_DIR[] = "/home/anon/cpp-tests/preprocessor"; +constexpr char TESTS_ROOT_DIR[] = "/home/anon/Tests/cpp-tests/preprocessor"; static String read_all(String const& path) { diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests.cpp index 1a0cf1fac7..cb2dd30fa9 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests.cpp @@ -35,7 +35,7 @@ static bool s_some_test_failed = false; return; \ } while (0) -constexpr char TESTS_ROOT_DIR[] = "/home/anon/cpp-tests/comprehension"; +constexpr char TESTS_ROOT_DIR[] = "/home/anon/Tests/cpp-tests/comprehension"; static void test_complete_local_args(); static void test_complete_local_vars(); diff --git a/Userland/Utilities/update-cpp-test-results.cpp b/Userland/Utilities/update-cpp-test-results.cpp index ac2959c975..dcaae7a0b0 100644 --- a/Userland/Utilities/update-cpp-test-results.cpp +++ b/Userland/Utilities/update-cpp-test-results.cpp @@ -13,7 +13,7 @@ ErrorOr serenity_main(Main::Arguments) { - Core::DirIterator parser_tests(LexicalPath::join(Core::StandardPaths::home_directory(), "cpp-tests/parser").string()); + Core::DirIterator parser_tests(LexicalPath::join(Core::StandardPaths::home_directory(), "Tests/cpp-tests/parser").string()); while (parser_tests.has_next()) { auto cpp_full_path = parser_tests.next_full_path(); if (!cpp_full_path.ends_with(".cpp")) @@ -24,7 +24,7 @@ ErrorOr serenity_main(Main::Arguments) VERIFY(!res.is_error()); } - Core::DirIterator preprocessor_tests(LexicalPath::join(Core::StandardPaths::home_directory(), "cpp-tests/preprocessor").string()); + Core::DirIterator preprocessor_tests(LexicalPath::join(Core::StandardPaths::home_directory(), "Tests/cpp-tests/preprocessor").string()); while (preprocessor_tests.has_next()) { auto cpp_full_path = preprocessor_tests.next_full_path(); if (!cpp_full_path.ends_with(".cpp"))