[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
Tue May 22 11:01:48 PDT 2018


delcypher created this revision.
delcypher added reviewers: rnk, ddunbar, kubamracek, zturner.

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

For both the multiprocess mode and in-process sequential mode using
`--max-time` didn't work. For the former calling `a.successful()`,
when the result was not ready would lead an exception being raised.
For the latter `max_time` was being completely ignored.

Two test cases have been added which test this basic functionality.

This implementation is for from ideal

- For the `multiprocess` mode, tests that started executing but didn't finish are marked as `UNRESOLVED`. In reality they should really be marked as `TIMEOUT`.
- For the single process mode lit's per test timeout feature has been used as a hacky way to make sure `--max-time` is properly enforced. This feature currently requires the python psutil module to be installed, so `--max-time` and `--single-process` used together now requires the python psutil module to be installed.


Repository:
  rL LLVM

https://reviews.llvm.org/D47210

Files:
  utils/lit/lit/run.py
  utils/lit/tests/Inputs/shtest-max-global-time/0_short.py
  utils/lit/tests/Inputs/shtest-max-global-time/1_infinite_loop.py
  utils/lit/tests/Inputs/shtest-max-global-time/lit.cfg
  utils/lit/tests/shtest-max-global-time-multiprocess.py
  utils/lit/tests/shtest-max-global-time-single-process.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47210.148055.patch
Type: text/x-patch
Size: 7198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180522/a2809fa9/attachment.bin>


More information about the llvm-commits mailing list