[Lldb-commits] [PATCH] Configurable timeout for tests
Oleksiy Vyalov
ovyalov at google.com
Tue Dec 9 10:38:48 PST 2014
Minor comments.
================
Comment at: test/dosep.py:43
@@ +42,3 @@
+ Set to "0" to run without any limit."""
+ if timeout_command is not None:
+ return subprocess.call([timeout_command, timeout] + command,
----------------
s/timeout_command/timeout_command is not None
================
Comment at: test/dosep.py:46
@@ +45,3 @@
+ stdin=subprocess.PIPE)
+ else:
+ return (ePassed if subprocess.call(command, stdin=subprocess.PIPE) == 0
----------------
No need to have else statement here.
================
Comment at: test/dosep.py:72
@@ +71,3 @@
+ command,
+ os.getenv("LLDB_" + name[:-3].upper() + "_TIMEOUT") or
+ os.getenv("LLDB_TEST_TIMEOUT") or "5m")
----------------
You may get basename without extension using sth like this - os.path.basename(os.path.splitext(name)[0])
================
Comment at: test/dosep.py:72
@@ +71,3 @@
+ command,
+ os.getenv("LLDB_" + name[:-3].upper() + "_TIMEOUT") or
+ os.getenv("LLDB_TEST_TIMEOUT") or "5m")
----------------
ovyalov wrote:
> You may get basename without extension using sth like this - os.path.basename(os.path.splitext(name)[0])
Could you store timeout as a separate variable to simplify this expression?
================
Comment at: test/dosep.py:166
@@ +165,3 @@
+ print "%s: LLDB (suite) :: %s (%s)" % (
+ "TIMEOUT" if f in timed_out else "FAIL", f, system_info
+ )
----------------
You may make timed_out as set to speed up lookup here.
http://reviews.llvm.org/D6575
More information about the lldb-commits
mailing list