-
Notifications
You must be signed in to change notification settings - Fork 14.1k
[libc++] Make libcxx/selftest a top-level test directory #144852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesThese tests aren't actually libc++-specific for the most part. They test the testsuite, so they aren't tied to any implementation. That means anybody using the testsuite should be able to run these tests successfully. The most notable changes are that
Full diff: https://github.com/llvm/llvm-project/pull/144852.diff 66 Files Affected:
diff --git a/libcxx/test/libcxx/selftest/modules/no-modules.sh.cpp b/libcxx/test/libcxx/modules/no-modules.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/modules/no-modules.sh.cpp
rename to libcxx/test/libcxx/modules/no-modules.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp b/libcxx/test/libcxx/modules/std-and-std.compat-module.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp
rename to libcxx/test/libcxx/modules/std-and-std.compat-module.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/modules/std-module.sh.cpp b/libcxx/test/libcxx/modules/std-module.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/modules/std-module.sh.cpp
rename to libcxx/test/libcxx/modules/std-module.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp b/libcxx/test/libcxx/modules/std.compat-module.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp
rename to libcxx/test/libcxx/modules/std.compat-module.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/additional_compile_flags/conditional-compile-flags.sh.cpp b/libcxx/test/selftest/additional_compile_flags/conditional-compile-flags.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/additional_compile_flags/conditional-compile-flags.sh.cpp
rename to libcxx/test/selftest/additional_compile_flags/conditional-compile-flags.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/additional_compile_flags/lit.local.cfg b/libcxx/test/selftest/additional_compile_flags/lit.local.cfg
similarity index 100%
rename from libcxx/test/libcxx/selftest/additional_compile_flags/lit.local.cfg
rename to libcxx/test/selftest/additional_compile_flags/lit.local.cfg
diff --git a/libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp b/libcxx/test/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp
rename to libcxx/test/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-run.sh.cpp b/libcxx/test/selftest/additional_compile_flags/substitutes-in-run.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-run.sh.cpp
rename to libcxx/test/selftest/additional_compile_flags/substitutes-in-run.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/compile.fail.cpp/compile-error.compile.fail.cpp b/libcxx/test/selftest/compile.fail.cpp/compile-error.compile.fail.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.fail.cpp/compile-error.compile.fail.cpp
rename to libcxx/test/selftest/compile.fail.cpp/compile-error.compile.fail.cpp
diff --git a/libcxx/test/libcxx/selftest/compile.fail.cpp/compile-success.compile.fail.cpp b/libcxx/test/selftest/compile.fail.cpp/compile-success.compile.fail.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.fail.cpp/compile-success.compile.fail.cpp
rename to libcxx/test/selftest/compile.fail.cpp/compile-success.compile.fail.cpp
diff --git a/libcxx/test/libcxx/selftest/compile.pass.cpp/compile-error.compile.pass.cpp b/libcxx/test/selftest/compile.pass.cpp/compile-error.compile.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.cpp/compile-error.compile.pass.cpp
rename to libcxx/test/selftest/compile.pass.cpp/compile-error.compile.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/compile.pass.cpp/compile-success.compile.pass.cpp b/libcxx/test/selftest/compile.pass.cpp/compile-success.compile.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.cpp/compile-success.compile.pass.cpp
rename to libcxx/test/selftest/compile.pass.cpp/compile-success.compile.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/compile.pass.cpp/link-error.compile.pass.cpp b/libcxx/test/selftest/compile.pass.cpp/link-error.compile.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.cpp/link-error.compile.pass.cpp
rename to libcxx/test/selftest/compile.pass.cpp/link-error.compile.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/compile.pass.cpp/run-error.compile.pass.cpp b/libcxx/test/selftest/compile.pass.cpp/run-error.compile.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.cpp/run-error.compile.pass.cpp
rename to libcxx/test/selftest/compile.pass.cpp/run-error.compile.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/compile.pass.mm/compile-error.compile.pass.mm b/libcxx/test/selftest/compile.pass.mm/compile-error.compile.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.mm/compile-error.compile.pass.mm
rename to libcxx/test/selftest/compile.pass.mm/compile-error.compile.pass.mm
diff --git a/libcxx/test/libcxx/selftest/compile.pass.mm/compile-success.compile.pass.mm b/libcxx/test/selftest/compile.pass.mm/compile-success.compile.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.mm/compile-success.compile.pass.mm
rename to libcxx/test/selftest/compile.pass.mm/compile-success.compile.pass.mm
diff --git a/libcxx/test/libcxx/selftest/compile.pass.mm/link-error.compile.pass.mm b/libcxx/test/selftest/compile.pass.mm/link-error.compile.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.mm/link-error.compile.pass.mm
rename to libcxx/test/selftest/compile.pass.mm/link-error.compile.pass.mm
diff --git a/libcxx/test/libcxx/selftest/compile.pass.mm/run-error.compile.pass.mm b/libcxx/test/selftest/compile.pass.mm/run-error.compile.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/compile.pass.mm/run-error.compile.pass.mm
rename to libcxx/test/selftest/compile.pass.mm/run-error.compile.pass.mm
diff --git a/libcxx/test/libcxx/selftest/convenience_substitutions/build_run.sh.cpp b/libcxx/test/selftest/convenience_substitutions/build_run.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/convenience_substitutions/build_run.sh.cpp
rename to libcxx/test/selftest/convenience_substitutions/build_run.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/convenience_substitutions/verify.sh.cpp b/libcxx/test/selftest/convenience_substitutions/verify.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/convenience_substitutions/verify.sh.cpp
rename to libcxx/test/selftest/convenience_substitutions/verify.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py b/libcxx/test/selftest/dsl/dsl.sh.py
similarity index 99%
rename from libcxx/test/libcxx/selftest/dsl/dsl.sh.py
rename to libcxx/test/selftest/dsl/dsl.sh.py
index 012759436d891..6d4406b7858e6 100644
--- a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py
+++ b/libcxx/test/selftest/dsl/dsl.sh.py
@@ -26,7 +26,7 @@
# Allow importing 'lit' and the 'libcxx' module. Make sure we put the lit
# path first so we don't find any system-installed version.
-monorepoRoot = dirname(dirname(dirname(dirname(dirname(dirname(__file__))))))
+monorepoRoot = dirname(dirname(dirname(dirname(dirname(__file__)))))
sys.path = [
os.path.join(monorepoRoot, "libcxx", "utils"),
os.path.join(monorepoRoot, "llvm", "utils", "lit"),
diff --git a/libcxx/test/libcxx/selftest/dsl/lit.local.cfg b/libcxx/test/selftest/dsl/lit.local.cfg
similarity index 100%
rename from libcxx/test/libcxx/selftest/dsl/lit.local.cfg
rename to libcxx/test/selftest/dsl/lit.local.cfg
diff --git a/libcxx/test/libcxx/selftest/file_dependencies/a.txt b/libcxx/test/selftest/file_dependencies/a.txt
similarity index 100%
rename from libcxx/test/libcxx/selftest/file_dependencies/a.txt
rename to libcxx/test/selftest/file_dependencies/a.txt
diff --git a/libcxx/test/libcxx/selftest/file_dependencies/absolute-and-relative-paths.sh.cpp b/libcxx/test/selftest/file_dependencies/absolute-and-relative-paths.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/file_dependencies/absolute-and-relative-paths.sh.cpp
rename to libcxx/test/selftest/file_dependencies/absolute-and-relative-paths.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/file_dependencies/dir/b.txt b/libcxx/test/selftest/file_dependencies/dir/b.txt
similarity index 100%
rename from libcxx/test/libcxx/selftest/file_dependencies/dir/b.txt
rename to libcxx/test/selftest/file_dependencies/dir/b.txt
diff --git a/libcxx/test/libcxx/selftest/file_dependencies/substitute-in-dependencies.sh.cpp b/libcxx/test/selftest/file_dependencies/substitute-in-dependencies.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/file_dependencies/substitute-in-dependencies.sh.cpp
rename to libcxx/test/selftest/file_dependencies/substitute-in-dependencies.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/gen.cpp/empty.gen.cpp b/libcxx/test/selftest/gen.cpp/empty.gen.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/gen.cpp/empty.gen.cpp
rename to libcxx/test/selftest/gen.cpp/empty.gen.cpp
diff --git a/libcxx/test/libcxx/selftest/gen.cpp/one.gen.cpp b/libcxx/test/selftest/gen.cpp/one.gen.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/gen.cpp/one.gen.cpp
rename to libcxx/test/selftest/gen.cpp/one.gen.cpp
diff --git a/libcxx/test/libcxx/selftest/gen.cpp/two.gen.cpp b/libcxx/test/selftest/gen.cpp/two.gen.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/gen.cpp/two.gen.cpp
rename to libcxx/test/selftest/gen.cpp/two.gen.cpp
diff --git a/libcxx/test/libcxx/selftest/link.fail.cpp/compile-error.link.fail.cpp b/libcxx/test/selftest/link.fail.cpp/compile-error.link.fail.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.fail.cpp/compile-error.link.fail.cpp
rename to libcxx/test/selftest/link.fail.cpp/compile-error.link.fail.cpp
diff --git a/libcxx/test/libcxx/selftest/link.fail.cpp/link-error.link.fail.cpp b/libcxx/test/selftest/link.fail.cpp/link-error.link.fail.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.fail.cpp/link-error.link.fail.cpp
rename to libcxx/test/selftest/link.fail.cpp/link-error.link.fail.cpp
diff --git a/libcxx/test/libcxx/selftest/link.fail.cpp/link-success.link.fail.cpp b/libcxx/test/selftest/link.fail.cpp/link-success.link.fail.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.fail.cpp/link-success.link.fail.cpp
rename to libcxx/test/selftest/link.fail.cpp/link-success.link.fail.cpp
diff --git a/libcxx/test/libcxx/selftest/link.pass.cpp/compile-error.link.pass.cpp b/libcxx/test/selftest/link.pass.cpp/compile-error.link.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.cpp/compile-error.link.pass.cpp
rename to libcxx/test/selftest/link.pass.cpp/compile-error.link.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/link.pass.cpp/link-error.link.pass.cpp b/libcxx/test/selftest/link.pass.cpp/link-error.link.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.cpp/link-error.link.pass.cpp
rename to libcxx/test/selftest/link.pass.cpp/link-error.link.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/link.pass.cpp/link-success.link.pass.cpp b/libcxx/test/selftest/link.pass.cpp/link-success.link.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.cpp/link-success.link.pass.cpp
rename to libcxx/test/selftest/link.pass.cpp/link-success.link.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/link.pass.cpp/run-error.link.pass.cpp b/libcxx/test/selftest/link.pass.cpp/run-error.link.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.cpp/run-error.link.pass.cpp
rename to libcxx/test/selftest/link.pass.cpp/run-error.link.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/link.pass.mm/compile-error.link.pass.mm b/libcxx/test/selftest/link.pass.mm/compile-error.link.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.mm/compile-error.link.pass.mm
rename to libcxx/test/selftest/link.pass.mm/compile-error.link.pass.mm
diff --git a/libcxx/test/libcxx/selftest/link.pass.mm/link-error.link.pass.mm b/libcxx/test/selftest/link.pass.mm/link-error.link.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.mm/link-error.link.pass.mm
rename to libcxx/test/selftest/link.pass.mm/link-error.link.pass.mm
diff --git a/libcxx/test/libcxx/selftest/link.pass.mm/link-success.link.pass.mm b/libcxx/test/selftest/link.pass.mm/link-success.link.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.mm/link-success.link.pass.mm
rename to libcxx/test/selftest/link.pass.mm/link-success.link.pass.mm
diff --git a/libcxx/test/libcxx/selftest/link.pass.mm/run-error.link.pass.mm b/libcxx/test/selftest/link.pass.mm/run-error.link.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/link.pass.mm/run-error.link.pass.mm
rename to libcxx/test/selftest/link.pass.mm/run-error.link.pass.mm
diff --git a/libcxx/test/selftest/lit.local.cfg b/libcxx/test/selftest/lit.local.cfg
new file mode 100644
index 0000000000000..4467d8070cc70
--- /dev/null
+++ b/libcxx/test/selftest/lit.local.cfg
@@ -0,0 +1,5 @@
+# The tests in this directory need to run Python
+import shlex
+import sys
+
+config.substitutions.append(("%{python}", shlex.quote(sys.executable)))
diff --git a/libcxx/test/libcxx/selftest/pass.cpp/compile-error.pass.cpp b/libcxx/test/selftest/pass.cpp/compile-error.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.cpp/compile-error.pass.cpp
rename to libcxx/test/selftest/pass.cpp/compile-error.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/pass.cpp/link-error.pass.cpp b/libcxx/test/selftest/pass.cpp/link-error.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.cpp/link-error.pass.cpp
rename to libcxx/test/selftest/pass.cpp/link-error.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/pass.cpp/run-error.pass.cpp b/libcxx/test/selftest/pass.cpp/run-error.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.cpp/run-error.pass.cpp
rename to libcxx/test/selftest/pass.cpp/run-error.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/pass.cpp/run-success.pass.cpp b/libcxx/test/selftest/pass.cpp/run-success.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.cpp/run-success.pass.cpp
rename to libcxx/test/selftest/pass.cpp/run-success.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/pass.cpp/werror.pass.cpp b/libcxx/test/selftest/pass.cpp/werror.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.cpp/werror.pass.cpp
rename to libcxx/test/selftest/pass.cpp/werror.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/pass.mm/compile-error.pass.mm b/libcxx/test/selftest/pass.mm/compile-error.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.mm/compile-error.pass.mm
rename to libcxx/test/selftest/pass.mm/compile-error.pass.mm
diff --git a/libcxx/test/libcxx/selftest/pass.mm/link-error.pass.mm b/libcxx/test/selftest/pass.mm/link-error.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.mm/link-error.pass.mm
rename to libcxx/test/selftest/pass.mm/link-error.pass.mm
diff --git a/libcxx/test/libcxx/selftest/pass.mm/no-arc.pass.mm b/libcxx/test/selftest/pass.mm/no-arc.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.mm/no-arc.pass.mm
rename to libcxx/test/selftest/pass.mm/no-arc.pass.mm
diff --git a/libcxx/test/libcxx/selftest/pass.mm/run-error.pass.mm b/libcxx/test/selftest/pass.mm/run-error.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.mm/run-error.pass.mm
rename to libcxx/test/selftest/pass.mm/run-error.pass.mm
diff --git a/libcxx/test/libcxx/selftest/pass.mm/run-success.pass.mm b/libcxx/test/selftest/pass.mm/run-success.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.mm/run-success.pass.mm
rename to libcxx/test/selftest/pass.mm/run-success.pass.mm
diff --git a/libcxx/test/libcxx/selftest/pass.mm/use-objective-cxx.pass.mm b/libcxx/test/selftest/pass.mm/use-objective-cxx.pass.mm
similarity index 100%
rename from libcxx/test/libcxx/selftest/pass.mm/use-objective-cxx.pass.mm
rename to libcxx/test/selftest/pass.mm/use-objective-cxx.pass.mm
diff --git a/libcxx/test/libcxx/selftest/remote-substitutions.sh.cpp b/libcxx/test/selftest/remote-substitutions.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/remote-substitutions.sh.cpp
rename to libcxx/test/selftest/remote-substitutions.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/sh.cpp/run-error.sh.cpp b/libcxx/test/selftest/sh.cpp/run-error.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/sh.cpp/run-error.sh.cpp
rename to libcxx/test/selftest/sh.cpp/run-error.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/sh.cpp/run-success.sh.cpp b/libcxx/test/selftest/sh.cpp/run-success.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/sh.cpp/run-success.sh.cpp
rename to libcxx/test/selftest/sh.cpp/run-success.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/sh.cpp/substitutions.sh.cpp b/libcxx/test/selftest/sh.cpp/substitutions.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/sh.cpp/substitutions.sh.cpp
rename to libcxx/test/selftest/sh.cpp/substitutions.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/sh.cpp/werror.sh.cpp b/libcxx/test/selftest/sh.cpp/werror.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/sh.cpp/werror.sh.cpp
rename to libcxx/test/selftest/sh.cpp/werror.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/shell-no-escape-builtins.sh.cpp b/libcxx/test/selftest/shell-no-escape-builtins.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/shell-no-escape-builtins.sh.cpp
rename to libcxx/test/selftest/shell-no-escape-builtins.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp b/libcxx/test/selftest/stdin-is-piped.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp
rename to libcxx/test/selftest/stdin-is-piped.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/test_macros.pass.cpp b/libcxx/test/selftest/test_macros.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/test_macros.pass.cpp
rename to libcxx/test/selftest/test_macros.pass.cpp
diff --git a/libcxx/test/libcxx/selftest/tmpdir-exists.sh.cpp b/libcxx/test/selftest/tmpdir-exists.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/tmpdir-exists.sh.cpp
rename to libcxx/test/selftest/tmpdir-exists.sh.cpp
diff --git a/libcxx/test/libcxx/selftest/verify.cpp/no-diagnostics-unmarked.verify.cpp b/libcxx/test/selftest/verify.cpp/no-diagnostics-unmarked.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/verify.cpp/no-diagnostics-unmarked.verify.cpp
rename to libcxx/test/selftest/verify.cpp/no-diagnostics-unmarked.verify.cpp
diff --git a/libcxx/test/libcxx/selftest/verify.cpp/no-diagnostics.verify.cpp b/libcxx/test/selftest/verify.cpp/no-diagnostics.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/verify.cpp/no-diagnostics.verify.cpp
rename to libcxx/test/selftest/verify.cpp/no-diagnostics.verify.cpp
diff --git a/libcxx/test/libcxx/selftest/verify.cpp/no-werror.verify.cpp b/libcxx/test/selftest/verify.cpp/no-werror.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/verify.cpp/no-werror.verify.cpp
rename to libcxx/test/selftest/verify.cpp/no-werror.verify.cpp
diff --git a/libcxx/test/libcxx/selftest/verify.cpp/right-diagnostic.verify.cpp b/libcxx/test/selftest/verify.cpp/right-diagnostic.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/verify.cpp/right-diagnostic.verify.cpp
rename to libcxx/test/selftest/verify.cpp/right-diagnostic.verify.cpp
diff --git a/libcxx/test/libcxx/selftest/verify.cpp/wrong-diagnostic.verify.cpp b/libcxx/test/selftest/verify.cpp/wrong-diagnostic.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/selftest/verify.cpp/wrong-diagnostic.verify.cpp
rename to libcxx/test/selftest/verify.cpp/wrong-diagnostic.verify.cpp
|
You can test this locally with the following command:darker --check --diff -r HEAD~1...HEAD libcxx/test/selftest/dsl/dsl.sh.py View the diff from darker here.--- dsl.sh.py 2025-06-19 07:50:02.000000 +0000
+++ dsl.sh.py 2025-06-19 07:59:48.680023 +0000
@@ -308,11 +308,11 @@
def test_basic(self):
macros = dsl.compilerMacros(self.config)
self.assertIsInstance(macros, dict)
self.assertGreater(len(macros), 0)
- for (k, v) in macros.items():
+ for k, v in macros.items():
self.assertIsInstance(k, str)
self.assertIsInstance(v, str)
def test_no_flag(self):
macros = dsl.compilerMacros(self.config)
@@ -341,11 +341,11 @@
def test_basic(self):
macros = dsl.featureTestMacros(self.config)
self.assertIsInstance(macros, dict)
self.assertGreater(len(macros), 0)
- for (k, v) in macros.items():
+ for k, v in macros.items():
self.assertIsInstance(k, str)
self.assertIsInstance(v, int)
class TestFeature(SetupConfigs):
|
You can test this locally with the following command:git-clang-format --diff HEAD~1 HEAD --extensions cpp -- libcxx/test/libcxx/modules/no-modules.sh.cpp libcxx/test/libcxx/modules/std-and-std.compat-module.sh.cpp libcxx/test/libcxx/modules/std-module.sh.cpp libcxx/test/libcxx/modules/std.compat-module.sh.cpp libcxx/test/selftest/additional_compile_flags/conditional-compile-flags.sh.cpp libcxx/test/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp libcxx/test/selftest/additional_compile_flags/substitutes-in-run.sh.cpp libcxx/test/selftest/compile.fail.cpp/compile-error.compile.fail.cpp libcxx/test/selftest/compile.fail.cpp/compile-success.compile.fail.cpp libcxx/test/selftest/compile.pass.cpp/compile-error.compile.pass.cpp libcxx/test/selftest/compile.pass.cpp/compile-success.compile.pass.cpp libcxx/test/selftest/compile.pass.cpp/link-error.compile.pass.cpp libcxx/test/selftest/compile.pass.cpp/run-error.compile.pass.cpp libcxx/test/selftest/convenience_substitutions/build_run.sh.cpp libcxx/test/selftest/convenience_substitutions/verify.sh.cpp libcxx/test/selftest/file_dependencies/absolute-and-relative-paths.sh.cpp libcxx/test/selftest/file_dependencies/substitute-in-dependencies.sh.cpp libcxx/test/selftest/gen.cpp/empty.gen.cpp libcxx/test/selftest/gen.cpp/one.gen.cpp libcxx/test/selftest/gen.cpp/two.gen.cpp libcxx/test/selftest/link.fail.cpp/compile-error.link.fail.cpp libcxx/test/selftest/link.fail.cpp/link-error.link.fail.cpp libcxx/test/selftest/link.fail.cpp/link-success.link.fail.cpp libcxx/test/selftest/link.pass.cpp/compile-error.link.pass.cpp libcxx/test/selftest/link.pass.cpp/link-error.link.pass.cpp libcxx/test/selftest/link.pass.cpp/link-success.link.pass.cpp libcxx/test/selftest/link.pass.cpp/run-error.link.pass.cpp libcxx/test/selftest/pass.cpp/compile-error.pass.cpp libcxx/test/selftest/pass.cpp/link-error.pass.cpp libcxx/test/selftest/pass.cpp/run-error.pass.cpp libcxx/test/selftest/pass.cpp/run-success.pass.cpp libcxx/test/selftest/pass.cpp/werror.pass.cpp libcxx/test/selftest/remote-substitutions.sh.cpp libcxx/test/selftest/sh.cpp/run-error.sh.cpp libcxx/test/selftest/sh.cpp/run-success.sh.cpp libcxx/test/selftest/sh.cpp/substitutions.sh.cpp libcxx/test/selftest/sh.cpp/werror.sh.cpp libcxx/test/selftest/shell-no-escape-builtins.sh.cpp libcxx/test/selftest/stdin-is-piped.sh.cpp libcxx/test/selftest/test_macros.pass.cpp libcxx/test/selftest/tmpdir-exists.sh.cpp libcxx/test/selftest/verify.cpp/no-diagnostics-unmarked.verify.cpp libcxx/test/selftest/verify.cpp/no-diagnostics.verify.cpp libcxx/test/selftest/verify.cpp/no-werror.verify.cpp libcxx/test/selftest/verify.cpp/right-diagnostic.verify.cpp libcxx/test/selftest/verify.cpp/wrong-diagnostic.verify.cpp View the diff from clang-format here.diff --git a/libcxx/test/selftest/compile.fail.cpp/compile-error.compile.fail.cpp b/libcxx/test/selftest/compile.fail.cpp/compile-error.compile.fail.cpp
index 9390f7c8e..31781f94e 100644
--- a/libcxx/test/selftest/compile.fail.cpp/compile-error.compile.fail.cpp
+++ b/libcxx/test/selftest/compile.fail.cpp/compile-error.compile.fail.cpp
@@ -8,7 +8,7 @@
// Make sure the test passes if it fails at compile-time
-struct Foo { };
+struct Foo {};
typedef Foo::x x;
int main(int, char**) { return 0; }
diff --git a/libcxx/test/selftest/compile.pass.cpp/compile-error.compile.pass.cpp b/libcxx/test/selftest/compile.pass.cpp/compile-error.compile.pass.cpp
index 6ff885053..e564b0fcf 100644
--- a/libcxx/test/selftest/compile.pass.cpp/compile-error.compile.pass.cpp
+++ b/libcxx/test/selftest/compile.pass.cpp/compile-error.compile.pass.cpp
@@ -10,7 +10,7 @@
// Make sure the test DOES NOT pass if it fails at compile-time
-struct Foo { };
+struct Foo {};
typedef Foo::x x;
int main(int, char**) { return 0; }
diff --git a/libcxx/test/selftest/compile.pass.cpp/link-error.compile.pass.cpp b/libcxx/test/selftest/compile.pass.cpp/link-error.compile.pass.cpp
index b5f6e5df1..a919652dd 100644
--- a/libcxx/test/selftest/compile.pass.cpp/link-error.compile.pass.cpp
+++ b/libcxx/test/selftest/compile.pass.cpp/link-error.compile.pass.cpp
@@ -11,6 +11,6 @@
extern void this_is_an_undefined_symbol();
int main(int, char**) {
- this_is_an_undefined_symbol();
- return 0;
+ this_is_an_undefined_symbol();
+ return 0;
}
diff --git a/libcxx/test/selftest/compile.pass.cpp/run-error.compile.pass.cpp b/libcxx/test/selftest/compile.pass.cpp/run-error.compile.pass.cpp
index dd1f084f6..29ea4ec0d 100644
--- a/libcxx/test/selftest/compile.pass.cpp/run-error.compile.pass.cpp
+++ b/libcxx/test/selftest/compile.pass.cpp/run-error.compile.pass.cpp
@@ -8,6 +8,4 @@
// Make sure the test passes even if there's a runtime error, i.e. it isn't run.
-int main(int, char**) {
- return 1;
-}
+int main(int, char**) { return 1; }
diff --git a/libcxx/test/selftest/link.fail.cpp/compile-error.link.fail.cpp b/libcxx/test/selftest/link.fail.cpp/compile-error.link.fail.cpp
index 607be79b8..4fa6873dc 100644
--- a/libcxx/test/selftest/link.fail.cpp/compile-error.link.fail.cpp
+++ b/libcxx/test/selftest/link.fail.cpp/compile-error.link.fail.cpp
@@ -10,7 +10,7 @@
// Make sure the test DOES NOT pass if it fails at compile-time.
-struct Foo { };
+struct Foo {};
typedef Foo::x x;
int main(int, char**) { return 0; }
diff --git a/libcxx/test/selftest/link.fail.cpp/link-error.link.fail.cpp b/libcxx/test/selftest/link.fail.cpp/link-error.link.fail.cpp
index 728940672..212bbe9f7 100644
--- a/libcxx/test/selftest/link.fail.cpp/link-error.link.fail.cpp
+++ b/libcxx/test/selftest/link.fail.cpp/link-error.link.fail.cpp
@@ -11,6 +11,6 @@
extern void this_is_an_undefined_symbol();
int main(int, char**) {
- this_is_an_undefined_symbol();
- return 0;
+ this_is_an_undefined_symbol();
+ return 0;
}
diff --git a/libcxx/test/selftest/link.pass.cpp/compile-error.link.pass.cpp b/libcxx/test/selftest/link.pass.cpp/compile-error.link.pass.cpp
index 607be79b8..4fa6873dc 100644
--- a/libcxx/test/selftest/link.pass.cpp/compile-error.link.pass.cpp
+++ b/libcxx/test/selftest/link.pass.cpp/compile-error.link.pass.cpp
@@ -10,7 +10,7 @@
// Make sure the test DOES NOT pass if it fails at compile-time.
-struct Foo { };
+struct Foo {};
typedef Foo::x x;
int main(int, char**) { return 0; }
diff --git a/libcxx/test/selftest/link.pass.cpp/link-error.link.pass.cpp b/libcxx/test/selftest/link.pass.cpp/link-error.link.pass.cpp
index 422c9a16a..a7928c608 100644
--- a/libcxx/test/selftest/link.pass.cpp/link-error.link.pass.cpp
+++ b/libcxx/test/selftest/link.pass.cpp/link-error.link.pass.cpp
@@ -13,6 +13,6 @@
extern void this_is_an_undefined_symbol();
int main(int, char**) {
- this_is_an_undefined_symbol();
- return 0;
+ this_is_an_undefined_symbol();
+ return 0;
}
diff --git a/libcxx/test/selftest/link.pass.cpp/run-error.link.pass.cpp b/libcxx/test/selftest/link.pass.cpp/run-error.link.pass.cpp
index ee44d1798..819dbf543 100644
--- a/libcxx/test/selftest/link.pass.cpp/run-error.link.pass.cpp
+++ b/libcxx/test/selftest/link.pass.cpp/run-error.link.pass.cpp
@@ -9,6 +9,4 @@
// Make sure the test passes if it succeeds to link, even though it would have
// failed at runtime.
-int main(int, char**) {
- return 1;
-}
+int main(int, char**) { return 1; }
diff --git a/libcxx/test/selftest/pass.cpp/compile-error.pass.cpp b/libcxx/test/selftest/pass.cpp/compile-error.pass.cpp
index 6ff885053..e564b0fcf 100644
--- a/libcxx/test/selftest/pass.cpp/compile-error.pass.cpp
+++ b/libcxx/test/selftest/pass.cpp/compile-error.pass.cpp
@@ -10,7 +10,7 @@
// Make sure the test DOES NOT pass if it fails at compile-time
-struct Foo { };
+struct Foo {};
typedef Foo::x x;
int main(int, char**) { return 0; }
diff --git a/libcxx/test/selftest/pass.cpp/link-error.pass.cpp b/libcxx/test/selftest/pass.cpp/link-error.pass.cpp
index 70e2ab66e..38ae1dc55 100644
--- a/libcxx/test/selftest/pass.cpp/link-error.pass.cpp
+++ b/libcxx/test/selftest/pass.cpp/link-error.pass.cpp
@@ -13,6 +13,6 @@
extern void this_is_an_undefined_symbol();
int main(int, char**) {
- this_is_an_undefined_symbol();
- return 0;
+ this_is_an_undefined_symbol();
+ return 0;
}
diff --git a/libcxx/test/selftest/pass.cpp/run-error.pass.cpp b/libcxx/test/selftest/pass.cpp/run-error.pass.cpp
index eac7d8846..8ef0c35f3 100644
--- a/libcxx/test/selftest/pass.cpp/run-error.pass.cpp
+++ b/libcxx/test/selftest/pass.cpp/run-error.pass.cpp
@@ -10,6 +10,4 @@
// Make sure the test DOES NOT pass if it fails at runtime.
-int main(int, char**) {
- return 1;
-}
+int main(int, char**) { return 1; }
diff --git a/libcxx/test/selftest/pass.cpp/run-success.pass.cpp b/libcxx/test/selftest/pass.cpp/run-success.pass.cpp
index c37b79a99..4c41e7510 100644
--- a/libcxx/test/selftest/pass.cpp/run-success.pass.cpp
+++ b/libcxx/test/selftest/pass.cpp/run-success.pass.cpp
@@ -8,6 +8,4 @@
// Make sure the test passes pass if it succeeds at runtime.
-int main(int, char**) {
- return 0;
-}
+int main(int, char**) { return 0; }
diff --git a/libcxx/test/selftest/pass.cpp/werror.pass.cpp b/libcxx/test/selftest/pass.cpp/werror.pass.cpp
index 590785fc1..e08160d6a 100644
--- a/libcxx/test/selftest/pass.cpp/werror.pass.cpp
+++ b/libcxx/test/selftest/pass.cpp/werror.pass.cpp
@@ -17,6 +17,4 @@
// TODO: We don't enable -Werror on GCC right now, because too many tests fail.
// UNSUPPORTED: gcc
-int main(int, char**) {
- int foo;
-}
+int main(int, char**) { int foo; }
diff --git a/libcxx/test/selftest/sh.cpp/werror.sh.cpp b/libcxx/test/selftest/sh.cpp/werror.sh.cpp
index 3188f57ec..b3ecf73a1 100644
--- a/libcxx/test/selftest/sh.cpp/werror.sh.cpp
+++ b/libcxx/test/selftest/sh.cpp/werror.sh.cpp
@@ -18,6 +18,6 @@
// RUN: %{run}
int main(int, char**) {
- int foo;
- return 0;
+ int foo;
+ return 0;
}
diff --git a/libcxx/test/selftest/test_macros.pass.cpp b/libcxx/test/selftest/test_macros.pass.cpp
index 9bcf7cf9a..86954d843 100644
--- a/libcxx/test/selftest/test_macros.pass.cpp
+++ b/libcxx/test/selftest/test_macros.pass.cpp
@@ -14,28 +14,25 @@
#include "test_macros.h"
#ifndef TEST_STD_VER
-#error TEST_STD_VER must be defined
+# error TEST_STD_VER must be defined
#endif
#ifndef TEST_NOEXCEPT
-#error TEST_NOEXCEPT must be defined
+# error TEST_NOEXCEPT must be defined
#endif
#ifndef LIBCPP_ASSERT
-#error LIBCPP_ASSERT must be defined
+# error LIBCPP_ASSERT must be defined
#endif
#ifndef LIBCPP_STATIC_ASSERT
-#error LIBCPP_STATIC_ASSERT must be defined
+# error LIBCPP_STATIC_ASSERT must be defined
#endif
-void test_noexcept() TEST_NOEXCEPT
-{
-}
+void test_noexcept() TEST_NOEXCEPT {}
-int main(int, char**)
-{
- test_noexcept();
+int main(int, char**) {
+ test_noexcept();
- return 0;
+ return 0;
}
diff --git a/libcxx/test/selftest/verify.cpp/no-werror.verify.cpp b/libcxx/test/selftest/verify.cpp/no-werror.verify.cpp
index e96d6be90..12d753949 100644
--- a/libcxx/test/selftest/verify.cpp/no-werror.verify.cpp
+++ b/libcxx/test/selftest/verify.cpp/no-werror.verify.cpp
@@ -11,5 +11,5 @@
// ADDITIONAL_COMPILE_FLAGS: -Wunused-variable
void f() {
- int foo; // expected-warning {{unused variable}}
+ int foo; // expected-warning {{unused variable}}
}
diff --git a/libcxx/test/selftest/verify.cpp/right-diagnostic.verify.cpp b/libcxx/test/selftest/verify.cpp/right-diagnostic.verify.cpp
index 8bca56870..9ed7a978e 100644
--- a/libcxx/test/selftest/verify.cpp/right-diagnostic.verify.cpp
+++ b/libcxx/test/selftest/verify.cpp/right-diagnostic.verify.cpp
@@ -8,5 +8,5 @@
// Make sure the test passes if the expected diagnostic is correct.
-struct Foo { };
+struct Foo {};
typedef Foo::x x; // expected-error{{no type named 'x' in 'Foo'}}
diff --git a/libcxx/test/selftest/verify.cpp/wrong-diagnostic.verify.cpp b/libcxx/test/selftest/verify.cpp/wrong-diagnostic.verify.cpp
index 3bc2ba841..493a133cd 100644
--- a/libcxx/test/selftest/verify.cpp/wrong-diagnostic.verify.cpp
+++ b/libcxx/test/selftest/verify.cpp/wrong-diagnostic.verify.cpp
@@ -10,5 +10,5 @@
// Make sure the test DOES NOT pass if the expected diagnostic is wrong.
-struct Foo { };
+struct Foo {};
typedef Foo::x x; // expected-error{{this is not found in the errors}}
|
These tests aren't actually libc++-specific for the most part. They test the testsuite, so they aren't tied to any implementation. That means anybody using the testsuite should be able to run these tests successfully.
The most notable changes are that
test/libcxx/selftest/modules
moved totest/libcxx/modules
, since the assumptions these tests check are libc++-specificlit.local.cfg
fortest/selftest
selftest/dsl/dsl.sh.py
was modified since the path to the monorepo root changed