Page MenuHomePhabricator

Ignore teardown failure if it's caused by removing missing file or directory
ClosedPublic

Authored by chying on Jun 29 2015, 8:32 PM.

Details

Summary

This is aiming to workaround this issue:
When test is decorated with expectedFlakey* and has teardown hook attached, the teardown hook will be added and executed twice,
the second execution will fail due to "missing file".

Diff Detail

Repository
rL LLVM

Event Timeline

chying updated this revision to Diff 28747.Jun 29 2015, 8:32 PM
chying retitled this revision from to Ignore teardown failure if it's caused by removing missing file or directory.
chying updated this object.
chying edited the test plan for this revision. (Show Details)
chying added reviewers: vharron, tberghammer.
chying added a subscriber: Unknown Object (MLST).
vharron edited edge metadata.Jun 29 2015, 9:09 PM

Maybe we should call teardown from expectedFlakey instead?

tberghammer edited edge metadata.Jun 30 2015, 2:32 AM

I agree that we should call a tear-down after each run of the test case because without it the 2 run might effect each other. Also the same is true for calling set-up before each run.

chying updated this revision to Diff 28823.Jun 30 2015, 3:52 PM
chying edited edge metadata.

Based on feedback, handle teardown and setup inside of expectedFlakey function.
Don't run retry if the test case is already marked as xfail or skip.

tberghammer accepted this revision.Jul 1 2015, 10:27 AM
tberghammer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 1 2015, 10:27 AM
This revision was automatically updated to reflect the committed changes.