[PATCH] D35878: [lit] Fix type error for parallelism groups

Brian Gesiak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 21:17:15 PDT 2017


modocache created this revision.

Whereas https://reviews.llvm.org/rL299560 and https://reviews.llvm.org/rL309071 call `parallelism_groups.items()`, under the
assumption that `parallelism_groups` is a `dict` type, the default
parameter for that attribute is a `list`. Change the default to a
`dict` for type correctness.

This regression in the unit tests would have been caught if the
unit tests were being run continously. It also would have been caught
if the lit project used a Python type checker such as `mypy`.

Test Plan:
As per the instructions in `utils/lit/README.txt`, run the lit unit
test suite:

  utils/lit/lit.py \
      --path /path/to/your/llvm/build/bin \
      utils/lit/tests

Verify that the test `lit :: unit/TestRunner.py` fails before applying this
patch, but passes once this patch is applied.


https://reviews.llvm.org/D35878

Files:
  utils/lit/lit/LitConfig.py


Index: utils/lit/lit/LitConfig.py
===================================================================
--- utils/lit/lit/LitConfig.py
+++ utils/lit/lit/LitConfig.py
@@ -25,7 +25,7 @@
                  params, config_prefix = None,
                  maxIndividualTestTime = 0,
                  maxFailures = None,
-                 parallelism_groups = [],
+                 parallelism_groups = {},
                  echo_all_commands = False):
         # The name of the test runner.
         self.progname = progname


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35878.108210.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170726/960801cf/attachment.bin>


More information about the llvm-commits mailing list