[llvm] 5632d37 - [lit] Silence warning about importing the resource module on Windows

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 16:11:21 PDT 2019


Author: Reid Kleckner
Date: 2019-10-30T16:11:16-07:00
New Revision: 5632d3756cd589a8139099317829a746dab650ee

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

LOG: [lit] Silence warning about importing the resource module on Windows

lit was printing this warning on every test run on Windows, and that is
not necessary.

Added: 
    

Modified: 
    llvm/utils/lit/lit/run.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py
index 4971ce8c050e..15e81447782f 100644
--- a/llvm/utils/lit/lit/run.py
+++ b/llvm/utils/lit/lit/run.py
@@ -163,7 +163,9 @@ def _increase_process_limit(self):
                 self.lit_config.note('Raised process limit from %d to %d' % \
                                         (soft_limit, desired_limit))
         except Exception as ex:
-            self.lit_config.warning('Failed to raise process limit: %s' % ex)
+            # Warn, unless this is Windows, in which case this is expected.
+            if os.name != 'nt':
+                self.lit_config.warning('Failed to raise process limit: %s' % ex)
 
     def _install_win32_signal_handler(self, pool):
         if lit.util.win32api is not None:


        


More information about the llvm-commits mailing list