From 8fe453ab5519831c0627eaea320fc532f5e9d736 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Mon, 3 Oct 2016 16:00:22 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283118 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/libcxx/test/format.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/libcxx/test/format.py b/test/libcxx/test/format.py index 5a6ac0657..1f07653b4 100644 --- a/test/libcxx/test/format.py +++ b/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,