[libcxx-commits] [libcxx] a2fc220 - [libc++] NFC: Remove unused parameters in the new test format

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 24 08:05:23 PDT 2020


Author: Louis Dionne
Date: 2020-04-24T11:05:11-04:00
New Revision: a2fc2207eb3c272e7706fe6a01708660f6bd218b

URL: https://github.com/llvm/llvm-project/commit/a2fc2207eb3c272e7706fe6a01708660f6bd218b
DIFF: https://github.com/llvm/llvm-project/commit/a2fc2207eb3c272e7706fe6a01708660f6bd218b.diff

LOG: [libc++] NFC: Remove unused parameters in the new test format

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 31720ac9f2e8..a494fb0fbae1 100644
--- a/libcxx/utils/libcxx/test/newformat.py
+++ b/libcxx/utils/libcxx/test/newformat.py
@@ -148,7 +148,7 @@ def _checkBaseSubstitutions(self, substitutions):
             assert s in substitutions, "Required substitution {} was not provided".format(s)
 
     # Determine whether clang-verify is supported.
-    def _supportsVerify(self, test, litConfig):
+    def _supportsVerify(self, test):
         command = "echo | %{cxx} -xc++ - -Werror -fsyntax-only -Xclang -verify-ignore-unexpected"
         command = lit.TestRunner.applySubstitutions([command], test.config.substitutions,
                                                     recursion_limit=test.config.recursiveExpansionLimit)[0]
@@ -156,7 +156,7 @@ def _supportsVerify(self, test, litConfig):
         result = subprocess.call(command, shell=True, stdout=devNull, stderr=devNull)
         return result == 0
 
-    def _disableWithModules(self, test, litConfig):
+    def _disableWithModules(self, test):
         with open(test.getSourcePath(), 'rb') as f:
             contents = f.read()
         return b'#define _LIBCPP_ASSERT' in contents
@@ -170,7 +170,7 @@ def execute(self, test, litConfig):
         #                split the part that does a death test outside of the
         #                test, and only disable that part when modules are
         #                enabled.
-        if '-fmodules' in test.config.available_features and self._disableWithModules(test, litConfig):
+        if '-fmodules' in test.config.available_features and self._disableWithModules(test):
             return lit.Test.Result(lit.Test.UNSUPPORTED, 'Test {} is unsupported when modules are enabled')
 
         # TODO(ldionne): Enable -Werror with all supported compilers.
@@ -224,7 +224,7 @@ def execute(self, test, litConfig):
         # otherwise it's like a .compile.fail.cpp test. This is only provided
         # for backwards compatibility with the test suite.
         elif filename.endswith('.fail.cpp'):
-            if self._supportsVerify(test, litConfig):
+            if self._supportsVerify(test):
                 steps = [
                     "%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} -fsyntax-only %{verify}"
                 ]
@@ -257,7 +257,7 @@ def _executeShTest(self, test, litConfig, steps, fileDependencies=None):
         substitutions.append(('%{run}', '%{exec} %t.exe'))
 
         # Add the %{verify} substitution and the verify-support feature if Clang-verify is supported
-        if self._supportsVerify(test, litConfig):
+        if self._supportsVerify(test):
             test.config.available_features.add('verify-support')
             substitutions.append(('%{verify}', '-Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0'))
 


        


More information about the libcxx-commits mailing list