[libcxx] r283118 - [lit] Allow more file extensions for test cases.

Logan Chien via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 09:00:23 PDT 2016


Author: logan
Date: Mon Oct  3 11:00:22 2016
New Revision: 283118

URL: http://llvm.org/viewvc/llvm-project?rev=283118&view=rev
Log:
[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.

Modified:
    libcxx/trunk/test/libcxx/test/format.py

Modified: libcxx/trunk/test/libcxx/test/format.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/format.py?rev=283118&r1=283117&r2=283118&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/format.py (original)
+++ libcxx/trunk/test/libcxx/test/format.py Mon Oct  3 11:00:22 2016
@@ -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,




More information about the cfe-commits mailing list