summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2016-10-03 16:00:22 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2016-10-03 16:00:22 +0000
commit45e8ba88c32bd929e024834f3f539f8bb8a94454 (patch)
tree6d1402d340363de246753fa80d3ba0dbdf503e3f /libcxx/test
parentd7325ee702bd16c86386c6789b9edee05d9e7aed (diff)
downloadbcm5719-llvm-45e8ba88c32bd929e024834f3f539f8bb8a94454.tar.gz
bcm5719-llvm-45e8ba88c32bd929e024834f3f539f8bb8a94454.zip
[lit] Allow more file extensions for test cases.
This commit splits the file extensions before determining the test format. This allows libc++abi to add assembly-based test cases. llvm-svn: 283118
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/libcxx/test/format.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/libcxx/test/format.py b/libcxx/test/libcxx/test/format.py
index 5a6ac06571f..1f07653b4bf 100644
--- a/libcxx/test/libcxx/test/format.py
+++ b/libcxx/test/libcxx/test/format.py
@@ -65,9 +65,11 @@ class LibcxxTestFormat(object):
def _execute(self, test, lit_config):
name = test.path_in_suite[-1]
- is_sh_test = name.endswith('.sh.cpp')
+ name_root, name_ext = os.path.splitext(name)
+ is_sh_test = name_root.endswith('.sh')
is_pass_test = name.endswith('.pass.cpp')
is_fail_test = name.endswith('.fail.cpp')
+ assert is_sh_test or name_ext == '.cpp', 'non-cpp file must be sh test'
if test.config.unsupported:
return (lit.Test.UNSUPPORTED,
OpenPOWER on IntegriCloud