mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
23f47cc464
A lit feature guards tests for the lit timeout functionality because on most system it depends on the availability of the psutil Python module. However, that feature is defined based on the ability of the testing lit to cancel test, which does not necessarily apply to the ability of the tested lit. In particular, RUN commands have a cleared PYTHONPATH and user site packages are disabled. In the case where psutil is found by the testing lit from one of those two source of python path, the tested lit would not be able to find it, causing timeout tests to fail. This commit fixes the issue by testing the ability to cancel tests in the RUN command environment. Reviewed By: yln Differential Revision: https://reviews.llvm.org/D99728
12 lines
199 B
Python
Executable File
12 lines
199 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import sys
|
|
from lit.util import killProcessAndChildrenIsSupported
|
|
|
|
supported, errormsg = killProcessAndChildrenIsSupported()
|
|
|
|
if not supported:
|
|
sys.exit(errormsg)
|
|
|
|
sys.exit()
|