[Lldb-commits] [lldb] r241879 - Don't let a test fail because of a teardown command returning an error. Use a function that doesn't check the return value.

Greg Clayton gclayton at apple.com
Thu Jul 9 17:30:22 PDT 2015


Author: gclayton
Date: Thu Jul  9 19:30:22 2015
New Revision: 241879

URL: http://llvm.org/viewvc/llvm-project?rev=241879&view=rev
Log:
Don't let a test fail because of a teardown command returning an error. Use a function that doesn't check the return value.


Modified:
    lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py

Modified: lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py?rev=241879&r1=241878&r2=241879&view=diff
==============================================================================
--- lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py (original)
+++ lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py Thu Jul  9 19:30:22 2015
@@ -21,8 +21,6 @@ class SBDirCheckerCase(TestBase):
         self.exe_name = 'a.out'
 
     @skipIfNoSBHeaders
-    @skipIfDarwin # test passes but teardown command 'settings remove target.env-vars DYLD_LIBRARY_PATH' fails
-    # (expectedFailureDarwin doesn't work for teardown failures)
     def test_sb_api_directory(self):
         """Test the SB API directory and make sure there's no unwanted stuff."""
 
@@ -75,7 +73,7 @@ class SBDirCheckerCase(TestBase):
         if self.TraceOn():
             print "Set environment to: ", env_cmd
         self.runCmd(env_cmd)
-        self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars %s" % self.dylibPath))
+        self.addTearDownHook(lambda: self.dbg.HandleCommand("settings remove target.env-vars %s" % self.dylibPath))
 
         lldbutil.run_break_set_by_file_and_line (self, self.source, self.line_to_break, num_expected_locations = -1)
 





More information about the lldb-commits mailing list