[libcxx-commits] [libcxx] f75ebe1 - [libc++] Support .sh.s tests in the new format
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 7 06:13:30 PDT 2020
Author: Louis Dionne
Date: 2020-04-07T09:13:21-04:00
New Revision: f75ebe1ab37b4f0e2e68b4184ed9c81c9d897b94
URL: https://github.com/llvm/llvm-project/commit/f75ebe1ab37b4f0e2e68b4184ed9c81c9d897b94
DIFF: https://github.com/llvm/llvm-project/commit/f75ebe1ab37b4f0e2e68b4184ed9c81c9d897b94.diff
LOG: [libc++] Support .sh.s tests in the new format
libc++abi has two of these tests.
Added:
Modified:
libcxx/utils/libcxx/test/newformat.py
Removed:
################################################################################
diff --git a/libcxx/utils/libcxx/test/newformat.py b/libcxx/utils/libcxx/test/newformat.py
index f2e8c0028c86..80760478f8fb 100644
--- a/libcxx/utils/libcxx/test/newformat.py
+++ b/libcxx/utils/libcxx/test/newformat.py
@@ -28,6 +28,7 @@ class CxxStandardLibraryTest(lit.formats.TestFormat):
FOO.link.pass.cpp - Compiles and links successfully, run not attempted
FOO.link.fail.cpp - Compiles successfully, but fails to link
FOO.sh.cpp - A builtin lit Shell test
+ FOO.sh.s - A builtin lit Shell test
FOO.fail.cpp - Does not compile successfully -- run with clang-verify
if any expected-meow appears in the file, otherwise
@@ -89,7 +90,7 @@ def getTestsInDirectory(self, testSuite, pathInSuite, litConfig, localConfig):
'.pass.mm',
'.compile.pass.cpp', '.compile.fail.cpp',
'.link.pass.cpp', '.link.fail.cpp',
- '.sh.cpp',
+ '.sh.cpp', '.sh.s',
'.fail.cpp', '.fail.mm']
sourcePath = testSuite.getSourcePath(pathInSuite)
for filename in os.listdir(sourcePath):
@@ -131,7 +132,7 @@ def execute(self, test, litConfig):
self._checkSubstitutions(test.config.substitutions)
VERIFY_FLAGS = '-Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0'
filename = test.path_in_suite[-1]
- if filename.endswith('.sh.cpp'):
+ if filename.endswith('.sh.cpp') or filename.endswith('.sh.s'):
steps = [ ] # The steps are already in the script
return self._executeShTest(test, litConfig, steps)
elif filename.endswith('.compile.pass.cpp'):
@@ -182,7 +183,7 @@ def execute(self, test, litConfig):
]
return self._executeShTest(test, litConfig, steps)
else:
- return lit.Test.Result(lit.Test.FAIL, "Unknown test suffix for '{}'".format(filename))
+ return lit.Test.Result(lit.Test.UNRESOLVED, "Unknown test suffix for '{}'".format(filename))
# Utility function to add compile flags in lit.local.cfg files.
def addCompileFlags(self, config, *flags):
More information about the libcxx-commits
mailing list