Skip to content

Commit

Permalink
[libc++] Support .sh.s tests in the new format
Browse files Browse the repository at this point in the history
libc++abi has two of these tests.
  • Loading branch information
ldionne committed Apr 7, 2020
1 parent 1bf055c commit f75ebe1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libcxx/utils/libcxx/test/newformat.py
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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'):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit f75ebe1

Please sign in to comment.