diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-29 21:03:39 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-29 21:03:39 +0000 |
| commit | 58b166325c2a3e60b72d557c250e7fc22c459a77 (patch) | |
| tree | b1c03a8ce7b1012234633cd8ffe38129d77c361f | |
| parent | e9bc35fe064bb2eedd24dc3fead722e20966e7c3 (diff) | |
| download | bcm5719-llvm-58b166325c2a3e60b72d557c250e7fc22c459a77.tar.gz bcm5719-llvm-58b166325c2a3e60b72d557c250e7fc22c459a77.zip | |
[lit] Check for the psutil module when setting a timeout
Apparently setting the per-test-timeout and not having the psutil
package constitutes to a fatal error. So only set the timeout when the
module is available.
llvm-svn: 359503
| -rw-r--r-- | lldb/lit/lit.cfg.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lldb/lit/lit.cfg.py b/lldb/lit/lit.cfg.py index 8f89a125870..51d02aabe13 100644 --- a/lldb/lit/lit.cfg.py +++ b/lldb/lit/lit.cfg.py @@ -74,8 +74,14 @@ for i in ['module-cache-clang', 'module-cache-lldb']: print("Deleting module cache at %s."%cachedir) shutil.rmtree(cachedir) -# Set a default timeout of 10 minutes. -lit_config.maxIndividualTestTime = 600 +# Set a default per-test timeout of 10 minutes. Setting a timeout per test +# requires the psutil module and lit complains if the value is set but the +# module can't be found. +try: + import psutil # noqa: F401 + lit_config.maxIndividualTestTime = 600 +except ImportError: + pass # If running tests natively, check for CPU features needed for some tests. |

