amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.

I'm not sure why this was timing out when running on my machine, since it took 
only 45 second for the tests to fail and the timeout seem to be set to 240 
seconds.

Simply skipping these cases wasn't enough because the inferior was being built 
12 times (once for each call to setUp).  So I moved the setUp work into the 
tests themselves.  Skipping stops wasting time building and rebuilding the 
inferiors.  It also seems to avoid the last lingering intermittent GNU Make 
crash.

Before going this route, I spent a lot of time trying to get the inferior to 
build on Windows.  I had to fix some POSIX assumptions in common.h and enable 
exceptions (which have been disabled on Windows because clang-cl exception 
support on Windows was lagging).  Enabling exceptions caused four other tests 
to fail, so we have that to look forward to.  And I wasn't able to figure out 
the linking problem where it complained that the -L option was ignored and then 
complained that it couldn't find liblldb.lib (because it ignored the -L option).

I'm open to other ideas, but this is the best way I can see to get unblocked.

http://reviews.llvm.org/D13923

Files:
  test/api/multithreaded/TestMultithreaded.py

Index: test/api/multithreaded/TestMultithreaded.py
===================================================================
--- test/api/multithreaded/TestMultithreaded.py
+++ test/api/multithreaded/TestMultithreaded.py
@@ -1,4 +1,4 @@
-"""Test the lldb public C++ api breakpoint callbacks.  """
+"""Test the lldb public C++ api breakpoint callbacks."""
 
 import os, re, StringIO
 import unittest2
@@ -10,41 +10,32 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-        self.lib_dir = os.environ["LLDB_LIB_DIR"]
-        self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
-        self.inferior = 'inferior_program'
-        if self.getLldbArchitecture() == self.getArchitecture():
-            self.buildProgram('inferior.cpp', self.inferior)
-            self.addTearDownHook(lambda: os.remove(self.inferior))
-
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch 
(llvm.org/pr24538)
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", 
compiler_version=[">=","4.9"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support 
throw or catch
     def test_breakpoint_callback(self):
         """Test the that SBBreakpoint callback is invoked when a breakpoint is 
hit. """
         self.build_and_test('driver.cpp test_breakpoint_callback.cpp',
                             'test_breakpoint_callback')
 
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch 
(llvm.org/pr24538)
     @expectedFlakeyFreeBSD
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", 
compiler_version=[">=","4.9"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support 
throw or catch
     def test_sb_api_listener_event_description(self):
         """ Test the description of an SBListener breakpoint event is valid."""
         self.build_and_test('driver.cpp listener_test.cpp 
test_listener_event_description.cpp',
                             'test_listener_event_description')
         pass
 
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch 
(llvm.org/pr24538)
     @expectedFlakeyFreeBSD
     @expectedFlakeyLinux # Driver occasionally returns '1' as exit status
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", 
compiler_version=[">=","4.9"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support 
throw or catch
     def test_sb_api_listener_event_process_state(self):
         """ Test that a registered SBListener receives events when a process
             changes state.
@@ -56,9 +47,9 @@
 
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch 
(llvm.org/pr24538)
     @expectedFlakeyFreeBSD
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", 
compiler_version=[">=","4.8"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support 
throw or catch
     def test_sb_api_listener_resume(self):
         """ Test that a process can be resumed from a non-main thread. """
         self.build_and_test('driver.cpp listener_test.cpp 
test_listener_resume.cpp',
@@ -75,6 +66,12 @@
         if self.getLldbArchitecture() != self.getArchitecture():
             self.skipTest("This test is only run if the target arch is the 
same as the lldb binary arch")
 
+        self.lib_dir = os.environ["LLDB_LIB_DIR"]
+        self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
+        self.inferior = 'inferior_program'
+        self.buildProgram('inferior.cpp', self.inferior)
+        self.addTearDownHook(lambda: os.remove(self.inferior))
+
         self.buildDriver(sources, test_name)
         self.addTearDownHook(lambda: os.remove(test_name))
 


Index: test/api/multithreaded/TestMultithreaded.py
===================================================================
--- test/api/multithreaded/TestMultithreaded.py
+++ test/api/multithreaded/TestMultithreaded.py
@@ -1,4 +1,4 @@
-"""Test the lldb public C++ api breakpoint callbacks.  """
+"""Test the lldb public C++ api breakpoint callbacks."""
 
 import os, re, StringIO
 import unittest2
@@ -10,41 +10,32 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-        self.lib_dir = os.environ["LLDB_LIB_DIR"]
-        self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
-        self.inferior = 'inferior_program'
-        if self.getLldbArchitecture() == self.getArchitecture():
-            self.buildProgram('inferior.cpp', self.inferior)
-            self.addTearDownHook(lambda: os.remove(self.inferior))
-
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch
     def test_breakpoint_callback(self):
         """Test the that SBBreakpoint callback is invoked when a breakpoint is hit. """
         self.build_and_test('driver.cpp test_breakpoint_callback.cpp',
                             'test_breakpoint_callback')
 
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
     @expectedFlakeyFreeBSD
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch
     def test_sb_api_listener_event_description(self):
         """ Test the description of an SBListener breakpoint event is valid."""
         self.build_and_test('driver.cpp listener_test.cpp test_listener_event_description.cpp',
                             'test_listener_event_description')
         pass
 
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
     @expectedFlakeyFreeBSD
     @expectedFlakeyLinux # Driver occasionally returns '1' as exit status
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch
     def test_sb_api_listener_event_process_state(self):
         """ Test that a registered SBListener receives events when a process
             changes state.
@@ -56,9 +47,9 @@
 
     @skipIfRemote
     @skipIfNoSBHeaders
+    @skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
     @expectedFlakeyFreeBSD
     @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.8"], archs=["x86_64"])
-    @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch
     def test_sb_api_listener_resume(self):
         """ Test that a process can be resumed from a non-main thread. """
         self.build_and_test('driver.cpp listener_test.cpp test_listener_resume.cpp',
@@ -75,6 +66,12 @@
         if self.getLldbArchitecture() != self.getArchitecture():
             self.skipTest("This test is only run if the target arch is the same as the lldb binary arch")
 
+        self.lib_dir = os.environ["LLDB_LIB_DIR"]
+        self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
+        self.inferior = 'inferior_program'
+        self.buildProgram('inferior.cpp', self.inferior)
+        self.addTearDownHook(lambda: os.remove(self.inferior))
+
         self.buildDriver(sources, test_name)
         self.addTearDownHook(lambda: os.remove(test_name))
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to