This is an archive of the discontinued LLVM Phabricator instance.

Change expectedFailureOS and skipIfPlatform checks to be based on target platform when running test suite remotely.
ClosedPublic

Authored by flackr on Mar 25 2015, 11:57 AM.

Details

Summary

Most expected OS failures or skipped tests are about the target platform on which the test binary is being run, not the host platform launching the tests. This changes expectedFailureOS and skipIfPlatform to check against the remote platform when running remote tests.

Diff Detail

Repository
rL LLVM

Event Timeline

flackr updated this revision to Diff 22660.Mar 25 2015, 11:57 AM
flackr retitled this revision from to Change expectedFailureOS to be based on target platform when running test suite remotely..
flackr updated this object.
flackr edited the test plan for this revision. (Show Details)
flackr added reviewers: clayborg, tberghammer, vharron.
flackr set the repository for this revision to rL LLVM.
flackr added a subscriber: Unknown Object (MLST).
tberghammer requested changes to this revision.Mar 25 2015, 12:09 PM
tberghammer edited edge metadata.

Please check for android also as it use "platform-android" (not platform-linux). I also suggest to use the TargetTriple instead of the given platform to decide the target platform.

This revision now requires changes to proceed.Mar 25 2015, 12:09 PM
flackr updated this revision to Diff 22689.Mar 25 2015, 5:00 PM
flackr edited edge metadata.

Uses GetTriple() to determine remote platform.

Please check for android also as it use "platform-android" (not platform-linux). I also suggest to use the TargetTriple instead of the given platform to decide the target platform.

Now that it uses Triple, android isn't in the list of OS's for Triple.cc, only an environment, does it return "linux" as well?

Please check for android also as it use "platform-android" (not platform-linux). I also suggest to use the TargetTriple instead of the given platform to decide the target platform.

Now that it uses Triple, android isn't in the list of OS's for Triple.cc, only an environment, does it return "linux" as well?

Android using <arch>-unknown-linux-android as the target triple so checking for linux will be fine.

test/dotest.py
1348 ↗(On Diff #22689)

You can get the target triple both on local and remote targets with "triple = lldb.DBG.GetSelectedPlatform().GetTriple()" (after running lldb.DBG.SetSelectedPlatform on remote platforms).
I suggest to use it so we can use the same OS detection on local and remote debugging.

In longer term I would like to get rid of most of the usage of sys.platform (leave it only where we want to check the host OS) from the test system but it is out of scope for this CL.

1362 ↗(On Diff #22689)

Please don't use sys.platfrom here

test/lldbtest.py
588–592 ↗(On Diff #22689)

You can use lldb.DBG.GetSelectedPlatform().GetTriple() here also (both for local and remote)

flackr updated this revision to Diff 22734.Mar 26 2015, 10:22 AM
flackr edited edge metadata.
  • Use lldb.DBG.GetSelectedPlatform().GetTriple() to get target platform triple whether running local or remote tests.
  • Change skipIfPlatform checks to also check remote platform.
  • Consider both "macosx" and "darwin" as MacOSX - see Triple::isMacOSX for equivalent check.
flackr retitled this revision from Change expectedFailureOS to be based on target platform when running test suite remotely. to Change expectedFailureOS and skipIfPlatform checks to be based on target platform when running test suite remotely..Mar 26 2015, 10:25 AM
flackr updated this object.
tberghammer accepted this revision.Mar 26 2015, 10:33 AM
tberghammer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 26 2015, 10:33 AM
clayborg accepted this revision.Mar 26 2015, 11:16 AM
clayborg edited edge metadata.

lgtm

This revision was automatically updated to reflect the committed changes.