[Lldb-commits] [lldb] r163712 - /lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py
Filipe Cabecinhas
me at filcab.net
Wed Sep 12 07:43:46 PDT 2012
Author: filcab
Date: Wed Sep 12 09:43:45 2012
New Revision: 163712
URL: http://llvm.org/viewvc/llvm-project?rev=163712&view=rev
Log:
Make TestAddDsymCommand not fail since bundles were accepted as add-dsym arguments.
Modified:
lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py
Modified: lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py?rev=163712&r1=163711&r2=163712&view=diff
==============================================================================
--- lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py (original)
+++ lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py Wed Sep 12 09:43:45 2012
@@ -43,6 +43,17 @@
self.exe_name = 'a.out'
self.do_add_dsym_with_success(self.exe_name)
+ def test_add_dsym_with_dSYM_bundle(self):
+ """Test that the 'add-dsym' command informs the user about success."""
+
+ # Call the program generator to produce main.cpp, version 1.
+ self.generate_main_cpp(version=1)
+ self.buildDsym(clean=True)
+
+ 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)
@@ -64,12 +75,11 @@
"""Test that the 'add-dsym' command informs the user about failures."""
self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET)
- wrong_path = "%s.dSYM" % exe_name
+ wrong_path = os.path.join("%s.dSYM" % exe_name, "Contents")
self.expect("add-dsym " + wrong_path, error=True,
- substrs = ['symbol file', 'with UUID', 'does not match',
- 'please specify the full path to the symbol file'])
+ substrs = ['invalid module path'])
- right_path = os.path.join(wrong_path, "Contents", "Resources", "DWARF", exe_name)
+ 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', 'with UUID', 'does not match'])
@@ -83,6 +93,16 @@
substrs = ['symbol file', 'with UUID', 'has been successfully added to the',
'module'])
+ 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."""
+ self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET)
+
+ # 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', 'with UUID', 'has been successfully added to the',
+ 'module'])
+
if __name__ == '__main__':
import atexit
More information about the lldb-commits
mailing list