[all-commits] [llvm/llvm-project] 008849: [libcxx] [test] Don't rerun supportsVerify for eac...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Dec 21 09:41:21 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 008849d7a51e4d7125d5b2eaeba495e4797dd749
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-12-21 (Tue, 21 Dec 2021)

  Changed paths:
    R libcxx/test/libcxx/selftest/fail.cpp/lit.local.cfg
    M libcxx/utils/libcxx/test/features.py
    M libcxx/utils/libcxx/test/format.py

  Log Message:
  [libcxx] [test] Don't rerun supportsVerify for each individual test

We can't just memoize _supportsVerify in place in format.py, as it
previously was executed in each of the individual processes.

Instead use hasCompileFlag() and add a feature flag for it instead,
which can be used both by tests (that already have such a flag,
locally for one set of tests) and for the testing framework itself.

By using hasCompileFlag(), this also implicitly fixes two other issues:
Previously, _supportsVerify called subprocess.call() directly, which can
interpret command line quoting differently than lit.TestRunner.

(In particular, TestRunner handles arguments quoted by a single quote,
while launching Windows processes with subprocess.call() only supports
double quotes. This allows using shlex.quote(), which uses single quotes,
everywhere - as all commands now go through TestRunner. This should make
41d7909368bebc897467a75860a524a5f172564f redundant.)

Secondly, the old _supportsVerify method didn't include %{flags) or

Differential Revision: https://reviews.llvm.org/D116010

More information about the All-commits mailing list