aboutsummaryrefslogtreecommitdiff
path: root/libcxx/utils
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/utils')
-rw-r--r--libcxx/utils/ci/BOT_OWNERS.txt5
-rw-r--r--libcxx/utils/ci/buildkite-pipeline.yml2
-rw-r--r--libcxx/utils/libcxx/test/dsl.py6
-rw-r--r--libcxx/utils/libcxx/test/features.py8
-rw-r--r--libcxx/utils/libcxx/test/format.py26
-rwxr-xr-xlibcxx/utils/ssh.py2
-rwxr-xr-xlibcxx/utils/test-at-commit2
7 files changed, 31 insertions, 20 deletions
diff --git a/libcxx/utils/ci/BOT_OWNERS.txt b/libcxx/utils/ci/BOT_OWNERS.txt
index 90f8272..3a92ba2 100644
--- a/libcxx/utils/ci/BOT_OWNERS.txt
+++ b/libcxx/utils/ci/BOT_OWNERS.txt
@@ -21,3 +21,8 @@ N: Android libc++
E: pirama@google.com, sharjeelkhan@google.com
G: pirama-arumuga-nainar, Sharjeel-Khan
D: Emulator-based x86[-64] libc++ CI testing
+
+N: FreeBSD libc++
+E: emaste@freebsd.org
+G: emaste
+D: FreeBSD x86-64 libc++ CI testing
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 3f3e6b4..d564ea6 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -103,6 +103,7 @@ steps:
queue: libcxx-builders
os: aix
<<: *common
+ skip: "https://github.com/llvm/llvm-project/issues/162516"
- label: AIX (64-bit)
command: libcxx/utils/ci/run-buildbot aix
@@ -114,6 +115,7 @@ steps:
queue: libcxx-builders
os: aix
<<: *common
+ skip: "https://github.com/llvm/llvm-project/issues/162516"
- group: ':freebsd: FreeBSD'
steps:
diff --git a/libcxx/utils/libcxx/test/dsl.py b/libcxx/utils/libcxx/test/dsl.py
index 9a97e61..3fb30d8 100644
--- a/libcxx/utils/libcxx/test/dsl.py
+++ b/libcxx/utils/libcxx/test/dsl.py
@@ -111,8 +111,8 @@ def _makeConfigTest(config):
os.makedirs(supportDir)
# Create a dummy test suite and single dummy test inside it. As part of
- # the Lit configuration, automatically do the equivalent of 'mkdir %T'
- # and 'rm -r %T' to avoid cluttering the build directory.
+ # the Lit configuration, automatically do the equivalent of 'mkdir %{temp}'
+ # and 'rm -r %{temp}' to avoid cluttering the build directory.
suite = lit.Test.TestSuite("__config__", sourceRoot, execRoot, config)
tmp = tempfile.NamedTemporaryFile(dir=sourceRoot, delete=False, suffix=".cpp")
tmp.close()
@@ -296,7 +296,7 @@ def hasAnyLocale(config, locales):
+ name_string_literals
+ """, nullptr,
};
- int main() {
+ int main(int, char**) {
for (size_t i = 0; test_locale_names[i]; i++) {
if (::setlocale(LC_ALL, test_locale_names[i]) != NULL) {
return 0;
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 0070b76..7d6e78d 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -30,7 +30,7 @@ def _getAndroidDeviceApi(cfg):
r"""
#include <android/api-level.h>
#include <stdio.h>
- int main() {
+ int main(int, char**) {
printf("%d\n", android_get_device_api_level());
return 0;
}
@@ -66,7 +66,7 @@ def _mingwSupportsModules(cfg):
#else
// __MINGW64_VERSION_MAJOR > 12 should be ok.
#endif
- int main() { return 0; }
+ int main(int, char**) { return 0; }
""",
)
@@ -474,7 +474,7 @@ def _getLocaleFlagsAction(cfg, locale, alts, members):
#include <wchar.h>
// Print each requested locale conversion member on separate lines.
- int main() {
+ int main(int, char**) {
const char* locales[] = { %s };
for (int loc_i = 0; loc_i < %d; ++loc_i) {
if (!setlocale(LC_ALL, locales[loc_i])) {
@@ -629,7 +629,7 @@ DEFAULT_FEATURES += [
"""
#include <stdio.h>
#include <windows.h>
- int main() {
+ int main(int, char**) {
CHAR tempDirPath[MAX_PATH];
DWORD tempPathRet = GetTempPathA(MAX_PATH, tempDirPath);
if (tempPathRet == 0 || tempPathRet > MAX_PATH) {
diff --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py
index c9dffd1..975209c 100644
--- a/libcxx/utils/libcxx/test/format.py
+++ b/libcxx/utils/libcxx/test/format.py
@@ -17,10 +17,10 @@ LIBCXX_UTILS = os.path.dirname(os.path.dirname(os.path.dirname(THIS_FILE)))
def _getTempPaths(test):
"""
- Return the values to use for the %T and %t substitutions, respectively.
+ Return the values to use for the %{temp} and %t substitutions, respectively.
The difference between this and Lit's default behavior is that we guarantee
- that %T is a path unique to the test being run.
+ that %{temp} is a path unique to the test being run.
"""
tmpDir, _ = lit.TestRunner.getTempPaths(test)
_, testName = os.path.split(test.getExecPath())
@@ -92,7 +92,7 @@ def parseScript(test, preamble):
# errors, which doesn't make sense for clang-verify tests because we may want to check
# for specific warning diagnostics.
_checkBaseSubstitutions(substitutions)
- substitutions.append(("%T", tmpDir))
+ substitutions.append(("%{temp}", tmpDir))
substitutions.append(
("%{build}", "%{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe")
)
@@ -150,7 +150,7 @@ def parseScript(test, preamble):
# that file to the execution directory. Execute the copy from %S to allow
# relative paths from the test directory.
for dep in fileDependencies:
- script += ["%dbg(SETUP) cd %S && cp {} %T".format(dep)]
+ script += ["%dbg(SETUP) cd %S && cp {} %{{temp}}".format(dep)]
script += preamble
script += scriptInTest
@@ -178,11 +178,11 @@ def parseScript(test, preamble):
"%dbg(MODULE std.compat) %{cxx} %{flags} "
f"{compileFlags} "
"-Wno-reserved-module-identifier -Wno-reserved-user-defined-literal "
- "-fmodule-file=std=%T/std.pcm " # The std.compat module imports std.
- "--precompile -o %T/std.compat.pcm -c %{module-dir}/std.compat.cppm",
+ "-fmodule-file=std=%{temp}/std.pcm " # The std.compat module imports std.
+ "--precompile -o %{temp}/std.compat.pcm -c %{module-dir}/std.compat.cppm",
)
moduleCompileFlags.extend(
- ["-fmodule-file=std.compat=%T/std.compat.pcm", "%T/std.compat.pcm"]
+ ["-fmodule-file=std.compat=%{temp}/std.compat.pcm", "%{temp}/std.compat.pcm"]
)
# Make sure the std module is built before std.compat. Libc++'s
@@ -195,9 +195,9 @@ def parseScript(test, preamble):
"%dbg(MODULE std) %{cxx} %{flags} "
f"{compileFlags} "
"-Wno-reserved-module-identifier -Wno-reserved-user-defined-literal "
- "--precompile -o %T/std.pcm -c %{module-dir}/std.cppm",
+ "--precompile -o %{temp}/std.pcm -c %{module-dir}/std.cppm",
)
- moduleCompileFlags.extend(["-fmodule-file=std=%T/std.pcm", "%T/std.pcm"])
+ moduleCompileFlags.extend(["-fmodule-file=std=%{temp}/std.pcm", "%{temp}/std.pcm"])
# Add compile flags required for the modules.
substitutions = config._appendToSubstitution(
@@ -261,6 +261,10 @@ class CxxStandardLibraryTest(lit.formats.FileBasedTest):
%{run}
Equivalent to `%{exec} %t.exe`. This is intended to be used
in conjunction with the %{build} substitution.
+
+ %{temp}
+ This substitution expands to a non-existent temporary path unique to the test.
+ It is typically used to create a temporary directory.
"""
def getTestsForPath(self, testSuite, pathInSuite, litConfig, localConfig):
@@ -355,9 +359,9 @@ class CxxStandardLibraryTest(lit.formats.FileBasedTest):
"%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} %{benchmark_flags} %{link_flags} -o %t.exe",
]
if "enable-benchmarks=run" in test.config.available_features:
- steps += ["%dbg(EXECUTED AS) %{exec} %t.exe --benchmark_out=%T/benchmark-result.json --benchmark_out_format=json"]
+ steps += ["%dbg(EXECUTED AS) %{exec} %t.exe --benchmark_out=%{temp}/benchmark-result.json --benchmark_out_format=json"]
parse_results = os.path.join(LIBCXX_UTILS, 'parse-google-benchmark-results')
- steps += [f"{parse_results} %T/benchmark-result.json --output-format=lnt > %T/results.lnt"]
+ steps += [f"{parse_results} %{{temp}}/benchmark-result.json --output-format=lnt > %{{temp}}/results.lnt"]
return self._executeShTest(test, litConfig, steps)
elif re.search('[.]gen[.][^.]+$', filename): # This only happens when a generator test is not supported
return self._executeShTest(test, litConfig, [])
diff --git a/libcxx/utils/ssh.py b/libcxx/utils/ssh.py
index ec16efc..77e79ce 100755
--- a/libcxx/utils/ssh.py
+++ b/libcxx/utils/ssh.py
@@ -57,7 +57,7 @@ def main():
return subprocess.run(command, *args_, **kwargs)
# Create a temporary directory where the test will be run.
- # That is effectively the value of %T on the remote host.
+ # That is effectively the value of %{temp} on the remote host.
tmp = runCommand(
ssh("mktemp -d {}/libcxx.XXXXXXXXXX".format(args.tempdir)),
universal_newlines=True,
diff --git a/libcxx/utils/test-at-commit b/libcxx/utils/test-at-commit
index d62643d..f20bf5f 100755
--- a/libcxx/utils/test-at-commit
+++ b/libcxx/utils/test-at-commit
@@ -22,7 +22,7 @@ config.substitutions.append(('%{{flags}}',
))
config.substitutions.append(('%{{compile_flags}}', '-nostdinc++ -I {INSTALL_ROOT}/include/c++/v1 -I %{{libcxx-dir}}/test/support'))
config.substitutions.append(('%{{link_flags}}', '-nostdlib++ -L {INSTALL_ROOT}/lib -Wl,-rpath,{INSTALL_ROOT}/lib -lc++'))
-config.substitutions.append(('%{{exec}}', '%{{executor}} --execdir %T -- '))
+config.substitutions.append(('%{{exec}}', '%{{executor}} --execdir %{{temp}} -- '))
import os, site
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))