[lit] Set --single-process for single tests and --threads=1
authorJulian Lettner <jlettner@apple.com>
Thu, 14 Feb 2019 22:30:07 +0000 (22:30 +0000)
committerJulian Lettner <jlettner@apple.com>
Thu, 14 Feb 2019 22:30:07 +0000 (22:30 +0000)
commit96adb78b120b6aa9739eb714534dc8e819f7bc52
tree065ef17df39eb3b6b42738c1951bc5a78faec390
parent9e5e868d95c25c1c5b09f315cc9f7f15885d61a2
[lit] Set --single-process for single tests and --threads=1

Summary:
Automatically upgrade debugging experience (single process, no thread
pool) when:
  1) we only run a single test
  2) user specifies `-j1`

Details:
Fix `--max-failures` in single process mode. Option did not have an
effect in single process mode.

Add display feedback for single process mode. Adapted test.

Improve argument checking (require positive integers).

`--single-process` is now essentially an alias for `-j1`. Should we
remove it?

Reviewers: rnk

Differential Revision: https://reviews.llvm.org/D58249

llvm-svn: 354068
llvm/utils/lit/lit/LitConfig.py
llvm/utils/lit/lit/discovery.py
llvm/utils/lit/lit/main.py
llvm/utils/lit/lit/run.py
llvm/utils/lit/tests/max-failures.py
llvm/utils/lit/tests/unit/TestRunner.py