This is an archive of the discontinued LLVM Phabricator instance.

Save / restore selected platform in tests that may change it
ClosedPublic

Authored by jasonmolenda on Aug 15 2019, 7:44 PM.

Details

Summary

Running the testsuite against an iOS device, it seems like I can lose the remote platform when certain tests run (and running in single-threaded mode aka no-multiprocess mode). Attached is a patch to use the setUp/tearDown test class methods to save/restore the platform.

I'm not sure if fixing this on a test-by-test basis is the right place for it. It might be better to have dotest.py's run_suite() save the remote platform and lldbtest.py's class Base setUpClass() method re-set the platform before the test is invoked, in case it was mutated during a test run.

Pavel, what do you think about this?

Diff Detail

Repository
rL LLVM

Event Timeline

jasonmolenda created this revision.Aug 15 2019, 7:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2019, 7:44 PM
Herald added a subscriber: abidh. · View Herald Transcript

I'm not sure if fixing this on a test-by-test basis is the right place for it. It might be better to have dotest.py's run_suite() save the remote platform and lldbtest.py's class Base setUpClass() method re-set the platform before the test is invoked, in case it was mutated during a test run.

Yeah, I was thinking the same thing. I think that, at this point, we have enough tests needs things like this that a more general solution is justified.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 20 2019, 5:27 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2019, 5:27 PM