[Lldb-commits] [lldb] r274393 - Fixed thread local storage test case to run normally with no expected fail for Darwin, always skip on windows, and expected fail for all other OSs while mentioning the new bug I filed to track fixing TLS variables: https://llvm.org/bugs/show_bug.cgi?id=28392

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 1 15:33:14 PDT 2016


Author: gclayton
Date: Fri Jul  1 17:33:13 2016
New Revision: 274393

URL: http://llvm.org/viewvc/llvm-project?rev=274393&view=rev
Log:
Fixed thread local storage test case to run normally with no expected fail for Darwin, always skip on windows, and expected fail for all other OSs while mentioning the new bug I filed to track fixing TLS variables: https://llvm.org/bugs/show_bug.cgi?id=28392


Modified:
    lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py?rev=274393&r1=274392&r2=274393&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py Fri Jul  1 17:33:13 2016
@@ -27,8 +27,18 @@ class TlsGlobalTestCase(TestBase):
             self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars " + self.dylibPath))
 
     @skipIfWindows # TLS works differently on Windows, this would need to be implemented separately.
-    @unittest2.expectedFailure("now works on Darwin, but not linux")
-    def test(self):
+    @skipIfDarwin # Darwin has its own test below and we don't want it to expected fail with decorator below
+    @unittest2.expectedFailure("llvm.org/pr28392")
+    def test_non_darwin(self):
+        '''Mark as expected fail for all except Darwin or Windows'''
+        self.run_test()
+
+    @skipUnlessDarwin
+    def test_darwin(self):
+        '''Always run on darwin with no expected fail'''
+        self.run_test()
+    
+    def run_test(self):
         """Test thread-local storage."""
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")




More information about the lldb-commits mailing list