This is an archive of the discontinued LLVM Phabricator instance.

Configurable timeout for tests
ClosedPublic

Authored by chaoren on Dec 8 2014, 4:16 PM.

Details

Summary

Each test will timeout after 5 minutes by default.
Override the default timeout of 5 minutes with LLDB_TEST_TIMEOUT.
E.g., LLDB_TEST_TIMEOUT=10m
Override the timeout for individual tests with LLDB_[TEST NAME]_TIMEOUT.
E.g., LLDB_TESTCONCURRENTEVENTS_TIMEOUT=2m
Set to "0" to run without timeout.

See http://reviews.llvm.org/D6364.

Diff Detail

Event Timeline

chaoren updated this revision to Diff 17058.Dec 8 2014, 4:16 PM
chaoren retitled this revision from to Configurable timeout for tests.
chaoren updated this object.
chaoren edited the test plan for this revision. (Show Details)
chaoren added reviewers: vharron, ovyalov.
chaoren updated this object.
chaoren added a subscriber: Unknown Object (MLST).
chaoren updated this revision to Diff 17066.Dec 8 2014, 7:07 PM

Isolated the logic for finding the timeout command.

zturner added a subscriber: zturner.Dec 8 2014, 7:22 PM

I know this got reverted last time because it was causing some tests to timeout. I don't know what was causing that hang, but does this fix it?

Yes. When building using make instead of ninja, dotest requires stdin to be
piped. the stdin=subprocess.PIPE fixes it.

ovyalov edited edge metadata.Dec 9 2014, 10:38 AM

Minor comments.

test/dosep.py
43

s/timeout_command/timeout_command is not None

46

No need to have else statement here.

72

You may get basename without extension using sth like this - os.path.basename(os.path.splitext(name)[0])

72

Could you store timeout as a separate variable to simplify this expression?

166

You may make timed_out as set to speed up lookup here.

chaoren updated this revision to Diff 17083.Dec 9 2014, 10:42 AM
chaoren updated this object.
chaoren edited edge metadata.

Clearer wording and more reasonable example on docstirng.

chaoren updated this revision to Diff 17087.Dec 9 2014, 11:21 AM

Cleaned up some messy code as per Oleksiy's suggestions.

ovyalov accepted this revision.Dec 9 2014, 11:53 AM
ovyalov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 9 2014, 11:53 AM
vharron edited edge metadata.

Greg are you okay with this?

clayborg accepted this revision.Dec 11 2014, 11:15 AM
clayborg edited edge metadata.

lgtm

chaoren updated this revision to Diff 17246.Dec 12 2014, 3:24 PM
chaoren edited edge metadata.

Updated docstring placement.

vharron closed this revision.Dec 12 2014, 4:11 PM