Page MenuHomePhabricator

[NFC] Cleanup the code used to run shell commands from tests
ClosedPublic

Authored by tberghammer on Apr 5 2016, 6:58 AM.

Details

Summary

[NFC] Cleanup the code used to run shell commands from tests

Previously we had 3 different method to run shell commands on the
target and 4 copy of code waiting until a given file appears on the
target device (used for syncronization). This CL merges these methods
to 1 run_platform_command and 1 wait_for_file_on_target functions
located in some utility classes.

Diff Detail

Event Timeline

tberghammer updated this revision to Diff 52681.Apr 5 2016, 6:58 AM
tberghammer retitled this revision from to [NFC] Cleanup the code used to run shell commands from tests.
tberghammer updated this object.
tberghammer added a reviewer: labath.
tberghammer added a subscriber: lldb-commits.
labath accepted this revision.Apr 5 2016, 7:07 AM
labath edited edge metadata.

A very nice cleanup.

packages/Python/lldbsuite/test/lldbutil.py
1040

Please put 0.30 here. I remember needing to increase this in ChangeProcessGroup because it was too low (=> flaky).

This revision is now accepted and ready to land.Apr 5 2016, 7:07 AM
tberghammer added inline comments.Apr 5 2016, 7:09 AM
packages/Python/lldbsuite/test/lldbutil.py
1040

Can we increase the default number of retries instead? 0.25 is nice from the point that the wait times are mostly integers (or how about 0.5)

This revision was automatically updated to reflect the committed changes.
tfiala added a subscriber: tfiala.Apr 8 2016, 10:57 AM

The exponential back off code forgot to import 'time'. This code will
trigger (and has on our end) a python exception for 'time' missing.

I'm fixing this now.