[PATCH] D47210: [lit] Fix the `--max-time` flag feature which was completely broken.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 01:07:17 PDT 2018


delcypher added inline comments.


================
Comment at: utils/lit/lit/run.py:127
+    def execute_tests_sequentially_in_process(self, max_time):
+        global child_lit_config
+        deadline = None
----------------
rnk wrote:
> If you are running the tests in process, there is no need to use this global child_lit_config. It is only needed so that mulitprocessing can pickle the data and set it up in the child process. We should be able to update self.lit_confi.maxIndividualTest time directly, and it will take effect.
I don't think use of `child_lit_config` matters here. `worker_initializer()` is not called on this path so AFAICT there's no copying going on. In `execute_tests_sequentially_in_process()` I have to modify the `child_lit_config` global because  `worker_run_one_test()` (which we call directly) expects it to be set.

In `execute_tests_sequentially_in_process()` I don't have to use `child_lit_config` so for clarity I will change this and add a comment about`child_lit_config`.


Repository:
  rL LLVM

https://reviews.llvm.org/D47210





More information about the llvm-commits mailing list