[PATCH] D14706: [lit] Implement support of per test timeout in lit.

Jonathan Roelofs via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 10:04:40 PST 2015


jroelofs added inline comments.

================
Comment at: utils/lit/tests/Inputs/per_test_timeout/lit.cfg:26
@@ +25,3 @@
+config.test_format = lit.formats.ShTest(execute_external=externalShell)
+# Note the ``.py`` suffix is deliberately not here so that running lit
+# on this directory doesn't cause ``infinite.py`` to be tested directly
----------------
Please revert this part of the change.

================
Comment at: utils/lit/tests/Inputs/per_test_timeout/slow.py:8
@@ +7,2 @@
+print("slow program")
+time.sleep(6)
----------------
delcypher wrote:
> If I did `lit.py tests/Inputs/per_test_timeout/` lit would try to run the `.py` scripts (in addition to the `.txt`) which would hang. 
> 
> I've changed `lit.cfg` just to run the `.txt` scripts. I was mistaken about needing `lit.cfg` trickery here.
> I thought that would also prevent the `.py` scripts from being in the `.txt` test cases that invoke lit (which is why I mentioned the `lit.cfg` trickery) but if you manually specify the test case names it doesn't seem to matter that `.py`` isn't in `config.suffixes`.
> 
> The latest patch I just uploaded should address this.
Ohh, I see what you were running into now. I don't think we have to worry about running lit on that particular test directory without the requisite `--timeout` flag.

> I've changed lit.cfg just to run the .txt scripts.

Running `lit.py tests/Inputs/per_test_timeout/` **should** hang, but running `lit.py tests/Inputs/per_test_timeout/ --timeout=1` should not.


http://reviews.llvm.org/D14706





More information about the llvm-commits mailing list