[Lldb-commits] [lldb] r374435 - [test] Add timeout to API tests.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 10 12:51:50 PDT 2019


Author: jdevlieghere
Date: Thu Oct 10 12:51:50 2019
New Revision: 374435

URL: http://llvm.org/viewvc/llvm-project?rev=374435&view=rev
Log:
[test] Add timeout to API tests.

Before the reorganiziation, the API tests were inheriting the timeout
from the top-level lit file. Now that this is no longer the case, the
lldb-api test suite needs to set its own timeout.

Modified:
    lldb/trunk/test/API/lit.cfg
    lldb/trunk/test/Shell/lit.cfg.py

Modified: lldb/trunk/test/API/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/API/lit.cfg?rev=374435&r1=374434&r2=374435&view=diff
==============================================================================
--- lldb/trunk/test/API/lit.cfg (original)
+++ lldb/trunk/test/API/lit.cfg Thu Oct 10 12:51:50 2019
@@ -61,6 +61,15 @@ for cachedir in [config.clang_module_cac
     print("Deleting module cache at %s."%cachedir)
     shutil.rmtree(cachedir)
 
+# Set a default per-test timeout of 10 minutes. Setting a timeout per test
+# requires that killProcessAndChildren() is supported on the platform and
+# lit complains if the value is set but it is not supported.
+supported, errormsg = lit_config.maxIndividualTestTimeIsSupported
+if supported:
+    lit_config.maxIndividualTestTime = 600
+else:
+    lit_config.warning("Could not set a default per-test timeout. " + errormsg)
+
 # Build dotest command.
 dotest_cmd = [config.dotest_path]
 dotest_cmd.extend(config.dotest_args_str.split(';'))

Modified: lldb/trunk/test/Shell/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/Shell/lit.cfg.py?rev=374435&r1=374434&r2=374435&view=diff
==============================================================================
--- lldb/trunk/test/Shell/lit.cfg.py (original)
+++ lldb/trunk/test/Shell/lit.cfg.py Thu Oct 10 12:51:50 2019
@@ -39,9 +39,7 @@ config.test_exec_root = os.path.join(con
 
 
 llvm_config.use_default_substitutions()
-
 toolchain.use_lldb_substitutions(config)
-
 toolchain.use_support_substitutions(config)
 
 




More information about the lldb-commits mailing list