diff options
Diffstat (limited to 'libcxx/utils')
-rw-r--r-- | libcxx/utils/ci/buildkite-pipeline.yml | 4 | ||||
-rw-r--r-- | libcxx/utils/libcxx/test/dsl.py | 4 | ||||
-rw-r--r-- | libcxx/utils/libcxx/test/format.py | 26 | ||||
-rwxr-xr-x | libcxx/utils/ssh.py | 2 | ||||
-rwxr-xr-x | libcxx/utils/test-at-commit | 2 |
5 files changed, 21 insertions, 17 deletions
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml index e7fda65..d564ea6 100644 --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -103,7 +103,7 @@ steps: queue: libcxx-builders os: aix <<: *common - skip: "Until https://github.com/llvm/llvm-project/issues/162516 has been resolved" + skip: "https://github.com/llvm/llvm-project/issues/162516" - label: AIX (64-bit) command: libcxx/utils/ci/run-buildbot aix @@ -115,7 +115,7 @@ steps: queue: libcxx-builders os: aix <<: *common - skip: "Until https://github.com/llvm/llvm-project/issues/162516 has been resolved" + 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 2d3a72c..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() 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')) |