[lit][NFC] Cleanup lit worker process handling
commit0631be28f6593aa9cd5916b6e482bf4ca4d97f34
authorJulian Lettner <jlettner@apple.com>
Sat, 16 Feb 2019 00:40:40 +0000 (16 00:40 +0000)
committerJulian Lettner <jlettner@apple.com>
Sat, 16 Feb 2019 00:40:40 +0000 (16 00:40 +0000)
tree9914f0b2e9060f79575ba5704bcad1620f0981a1
parent2b63446e67f71dd54fd798541ab2c01f7728f106
[lit][NFC] Cleanup lit worker process handling

Move code that is executed on worker process to separate file. This
makes the use of the pickled arguments stored in global variables in the
worker a bit clearer. (Still not pretty though.)

Extract handling of parallelism groups to it's own function.

Use BoundedSemaphore instead of Semaphore. BoundedSemaphore raises for
unmatched release() calls.

Cleanup imports.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354187 91177308-0d34-0410-b5e6-96231b3b80d8
utils/lit/lit/run.py
utils/lit/lit/util.py
utils/lit/lit/worker.py [new file with mode: 0644]