diff options
Diffstat (limited to 'packages/Python/lldbsuite/test/warnings/uuid')
| -rw-r--r-- | packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py | 44 | 
1 files changed, 30 insertions, 14 deletions
| diff --git a/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py b/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py index 5010309e8944..5df4c701ad9f 100644 --- a/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py +++ b/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py @@ -3,13 +3,14 @@  from __future__ import print_function - -import os, time +import os +import time  import lldb  from lldbsuite.test.decorators import *  from lldbsuite.test.lldbtest import *  from lldbsuite.test import lldbutil +  @skipUnlessDarwin  class AddDsymCommandCase(TestBase): @@ -29,7 +30,8 @@ class AddDsymCommandCase(TestBase):          self.generate_main_cpp(version=1)          self.buildDsym(clean=True) -        # Insert some delay and then call the program generator to produce main.cpp, version 2. +        # Insert some delay and then call the program generator to produce +        # main.cpp, version 2.          time.sleep(5)          self.generate_main_cpp(version=101)          # Now call make again, but this time don't generate the dSYM. @@ -60,15 +62,16 @@ class AddDsymCommandCase(TestBase):          self.exe_name = 'a.out'          self.do_add_dsym_with_dSYM_bundle(self.exe_name) -      def generate_main_cpp(self, version=0):          """Generate main.cpp from main.cpp.template."""          temp = os.path.join(os.getcwd(), self.template)          with open(temp, 'r') as f:              content = f.read() -        new_content = content.replace('%ADD_EXTRA_CODE%', -                                      'printf("This is version %d\\n");' % version) +        new_content = content.replace( +            '%ADD_EXTRA_CODE%', +            'printf("This is version %d\\n");' % +            version)          src = os.path.join(os.getcwd(), self.source)          with open(src, 'w') as f:              f.write(new_content) @@ -84,20 +87,33 @@ class AddDsymCommandCase(TestBase):          wrong_path = os.path.join("%s.dSYM" % exe_name, "Contents")          self.expect("add-dsym " + wrong_path, error=True, -            substrs = ['invalid module path']) - -        right_path = os.path.join("%s.dSYM" % exe_name, "Contents", "Resources", "DWARF", exe_name) +                    substrs=['invalid module path']) + +        right_path = os.path.join( +            "%s.dSYM" % +            exe_name, +            "Contents", +            "Resources", +            "DWARF", +            exe_name)          self.expect("add-dsym " + right_path, error=True, -            substrs = ['symbol file', 'does not match']) +                    substrs=['symbol file', 'does not match'])      def do_add_dsym_with_success(self, exe_name):          """Test that the 'add-dsym' command informs the user about success."""          self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET) -        # This time, the UUID should match and we expect some feedback from lldb. -        right_path = os.path.join("%s.dSYM" % exe_name, "Contents", "Resources", "DWARF", exe_name) +        # This time, the UUID should match and we expect some feedback from +        # lldb. +        right_path = os.path.join( +            "%s.dSYM" % +            exe_name, +            "Contents", +            "Resources", +            "DWARF", +            exe_name)          self.expect("add-dsym " + right_path, -            substrs = ['symbol file', 'has been added to']) +                    substrs=['symbol file', 'has been added to'])      def do_add_dsym_with_dSYM_bundle(self, exe_name):          """Test that the 'add-dsym' command informs the user about success when loading files in bundles.""" @@ -106,4 +122,4 @@ class AddDsymCommandCase(TestBase):          # This time, the UUID should be found inside the bundle          right_path = "%s.dSYM" % exe_name          self.expect("add-dsym " + right_path, -            substrs = ['symbol file', 'has been added to']) +                    substrs=['symbol file', 'has been added to']) | 
