[lit] Silence warning about importing the resource module on Windows
authorReid Kleckner <rnk@google.com>
Wed, 30 Oct 2019 23:10:24 +0000 (16:10 -0700)
committerReid Kleckner <rnk@google.com>
Wed, 30 Oct 2019 23:11:16 +0000 (16:11 -0700)
lit was printing this warning on every test run on Windows, and that is
not necessary.

llvm/utils/lit/lit/run.py

index 4971ce8..15e8144 100644 (file)
@@ -163,7 +163,9 @@ class ParallelRun(Run):
                 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: