This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Improve remote-index test
ClosedPublic

Authored by kbobyrev on Nov 2 2020, 12:32 AM.

Details

Summary

Introduce a separate thread that will kill clangd-index-server after 10 seconds regardless. This helps shut down the test if the server hangs and stderr.readline() does not contain inititalizatiton message. It prevents "necessary" waiting delay for the server warm-up and only introduces additional delay if the test fails.

It also makes use of subprocess.Popen.kill() which is a portable way of handling process shutdown and avoids using signals.

Diff Detail

Event Timeline

kbobyrev created this revision.Nov 2 2020, 12:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2020, 12:32 AM
kbobyrev requested review of this revision.Nov 2 2020, 12:32 AM
kbobyrev edited the summary of this revision. (Show Details)Nov 2 2020, 12:39 AM
kbobyrev edited the summary of this revision. (Show Details)Nov 2 2020, 12:40 AM
kadircet accepted this revision.Nov 2 2020, 1:51 AM
This revision is now accepted and ready to land.Nov 2 2020, 1:51 AM
This revision was landed with ongoing or failed builds.Nov 2 2020, 1:57 AM
This revision was automatically updated to reflect the committed changes.