[Lldb-commits] [PATCH] Change expectedFailureOS to be based on target platform when running test suite remotely.
tberghammer at google.com
Thu Mar 26 04:29:04 PDT 2015
In http://reviews.llvm.org/D8611#147071, @flackr wrote:
> In http://reviews.llvm.org/D8611#146810, @tberghammer wrote:
> > 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.
Comment at: test/dotest.py:1348
@@ -1357,2 +1347,3 @@
+ target_platform = lldb.remote_platform.GetTriple().split('-')
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.
Comment at: test/dotest.py:1362
@@ +1361,3 @@
+# Something for Windows here?
+dont_do_debugserver_test = "linux" in sys.platform or "freebsd" in target_platform
Please don't use sys.platfrom here
Comment at: test/lldbtest.py:588-592
@@ -587,4 +587,7 @@
def expectedFailureOS(os, bugnumber=None, compilers=None):
+ if lldb.remote_platform:
+ return (os in lldb.remote_platform.GetTriple().split('-') and
return os in sys.platform and self.expectedCompiler(compilers)
if bugnumber: return expectedFailure(fn, bugnumber)
You can use lldb.DBG.GetSelectedPlatform().GetTriple() here also (both for local and remote)
More information about the lldb-commits