Hi clayborg, tberghammer, vharron,

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

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.
@@ -1333,6 +1321,7 @@
 lldb.DBG = lldb.SBDebugger.Create()
 
 if lldb_platform_name:
+    lldb.target_platform = lldb_platform_name
     print "Setting up remote platform '%s'" % (lldb_platform_name)
     lldb.remote_platform = lldb.SBPlatform(lldb_platform_name)
     if not lldb.remote_platform.IsValid():
@@ -1356,8 +1345,24 @@
     lldb.remote_platform_working_dir = lldb_platform_working_dir
     lldb.DBG.SetSelectedPlatform(lldb.remote_platform)
 else:
+    lldb.target_platform = sys.platform
     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 lldb.target_platform or 
"freebsd" in lldb.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 
lldb.target_platform
+
+# Don't do lldb-server (llgs) tests on anything except Linux.
+dont_do_llgs_test = not ("linux" in lldb.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,7 +586,7 @@
 
 def expectedFailureOS(os, bugnumber=None, compilers=None):
     def fn(self):
-        return os in sys.platform and self.expectedCompiler(compilers)
+        return os in lldb.target_platform and self.expectedCompiler(compilers)
     if bugnumber: return expectedFailure(fn, bugnumber)
 
 def expectedFailureDarwin(bugnumber=None, compilers=None):

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
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.
@@ -1333,6 +1321,7 @@
 lldb.DBG = lldb.SBDebugger.Create()
 
 if lldb_platform_name:
+    lldb.target_platform = lldb_platform_name
     print "Setting up remote platform '%s'" % (lldb_platform_name)
     lldb.remote_platform = lldb.SBPlatform(lldb_platform_name)
     if not lldb.remote_platform.IsValid():
@@ -1356,8 +1345,24 @@
     lldb.remote_platform_working_dir = lldb_platform_working_dir
     lldb.DBG.SetSelectedPlatform(lldb.remote_platform)
 else:
+    lldb.target_platform = sys.platform
     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 lldb.target_platform or "freebsd" in lldb.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 lldb.target_platform
+
+# Don't do lldb-server (llgs) tests on anything except Linux.
+dont_do_llgs_test = not ("linux" in lldb.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,7 +586,7 @@
 
 def expectedFailureOS(os, bugnumber=None, compilers=None):
     def fn(self):
-        return os in sys.platform and self.expectedCompiler(compilers)
+        return os in lldb.target_platform and self.expectedCompiler(compilers)
     if bugnumber: return expectedFailure(fn, bugnumber)
 
 def expectedFailureDarwin(bugnumber=None, compilers=None):
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to