Author: jdevlieghere Date: Mon Apr 29 14:03:39 2019 New Revision: 359503 URL: http://llvm.org/viewvc/llvm-project?rev=359503&view=rev Log: [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. Modified: lldb/trunk/lit/lit.cfg.py Modified: lldb/trunk/lit/lit.cfg.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/lit.cfg.py?rev=359503&r1=359502&r2=359503&view=diff ============================================================================== --- lldb/trunk/lit/lit.cfg.py (original) +++ lldb/trunk/lit/lit.cfg.py Mon Apr 29 14:03:39 2019 @@ -74,8 +74,14 @@ for i in ['module-cache-clang', 'module- 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. _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits