[Lldb-commits] [PATCH] Change expectedFailureOS to be based on target platform when running test suite remotely.

Robert Flack flackr at gmail.com
Wed Mar 25 17:00:46 PDT 2015


Uses GetTriple() to determine remote platform.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8611

Files:
  test/dotest.py
  test/lldbtest.py

Index: test/dotest.py
===================================================================
--- test/dotest.py
+++ test/dotest.py
@@ -125,19 +125,7 @@
 # By default, benchmarks tests are not run.
 just_do_benchmarks_test = False
 
-# By default, both dsym and dwarf tests are performed.
-# Use @dsym_test or @dwarf_test decorators, defined in lldbtest.py, to mark a test
-# as a dsym or dwarf test.  Use '-N dsym' or '-N dwarf' to exclude dsym or dwarf
-# tests from running.
-dont_do_dsym_test = "linux" in sys.platform or "freebsd" in sys.platform
-dont_do_dwarf_test = False
-
-# Don't do debugserver tests on everything except OS X.
-# Something for Windows here?
-dont_do_debugserver_test = "linux" in sys.platform or "freebsd" in sys.platform
-
-# Don't do lldb-server (llgs) tests on anything except Linux.
-dont_do_llgs_test = not ("linux" in sys.platform)
+dont_do_dsym_test = False
 
 # The blacklist is optional (-b blacklistFile) and allows a central place to skip
 # testclass's and/or testclass.testmethod's.
@@ -1332,6 +1320,8 @@
 # Create a singleton SBDebugger in the lldb namespace.
 lldb.DBG = lldb.SBDebugger.Create()
 
+target_platform = sys.platform
+
 if lldb_platform_name:
     print "Setting up remote platform '%s'" % (lldb_platform_name)
     lldb.remote_platform = lldb.SBPlatform(lldb_platform_name)
@@ -1355,9 +1345,25 @@
     
     lldb.remote_platform_working_dir = lldb_platform_working_dir
     lldb.DBG.SetSelectedPlatform(lldb.remote_platform)
+    target_platform = lldb.remote_platform.GetTriple().split('-')[2]
 else:
     lldb.remote_platform = None
     lldb.remote_platform_working_dir = None
+
+# By default, both dsym and dwarf tests are performed.
+# Use @dsym_test or @dwarf_test decorators, defined in lldbtest.py, to mark a test
+# as a dsym or dwarf test.  Use '-N dsym' or '-N dwarf' to exclude dsym or dwarf
+# tests from running.
+dont_do_dsym_test = dont_do_dsym_test or "linux" in target_platform or "freebsd" in target_platform
+dont_do_dwarf_test = False
+
+# Don't do debugserver tests on everything except OS X.
+# Something for Windows here?
+dont_do_debugserver_test = "linux" in sys.platform or "freebsd" in target_platform
+
+# Don't do lldb-server (llgs) tests on anything except Linux.
+dont_do_llgs_test = not ("linux" in target_platform)
+
 # Put the blacklist in the lldb namespace, to be used by lldb.TestBase.
 lldb.blacklist = blacklist
 
Index: test/lldbtest.py
===================================================================
--- test/lldbtest.py
+++ test/lldbtest.py
@@ -586,6 +586,9 @@
 
 def expectedFailureOS(os, bugnumber=None, compilers=None):
     def fn(self):
+        if lldb.remote_platform:
+            return (os in lldb.remote_platform.GetTriple().split('-')[2] and
+                    self.expectedCompiler(compilers))
         return os in sys.platform and self.expectedCompiler(compilers)
     if bugnumber: return expectedFailure(fn, bugnumber)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8611.22689.patch
Type: text/x-patch
Size: 2941 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150326/53764682/attachment.bin>


More information about the lldb-commits mailing list