From f73363f1dd94996356cefbf24388f561891acf0b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 28 Jul 2018 11:09:23 +0000 Subject: Vendor import of lldb trunk r338150: https://llvm.org/svn/llvm-project/lldb/trunk@338150 --- .../test/warnings/uuid/TestAddDsymCommand.py | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py') diff --git a/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py b/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py index 5df4c701ad9f4..11c3bc86a6ed4 100644 --- a/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py +++ b/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py @@ -28,14 +28,14 @@ class AddDsymCommandCase(TestBase): # Call the program generator to produce main.cpp, version 1. self.generate_main_cpp(version=1) - self.buildDsym(clean=True) + self.buildDefault(dictionary={'MAKE_DSYM':'YES'}) # 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. - self.buildDwarf(clean=False) + self.buildDefault(dictionary={'MAKE_DSYM':'NO'}) self.exe_name = 'a.out' self.do_add_dsym_with_error(self.exe_name) @@ -46,7 +46,7 @@ class AddDsymCommandCase(TestBase): # Call the program generator to produce main.cpp, version 1. self.generate_main_cpp(version=1) - self.buildDsym(clean=True) + self.buildDefault(dictionary={'MAKE_DSYM':'YES'}) self.exe_name = 'a.out' self.do_add_dsym_with_success(self.exe_name) @@ -57,14 +57,14 @@ class AddDsymCommandCase(TestBase): # Call the program generator to produce main.cpp, version 1. self.generate_main_cpp(version=1) - self.buildDsym(clean=True) + self.buildDefault(dictionary={'MAKE_DSYM':'YES'}) 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) + temp = os.path.join(self.getSourceDir(), self.template) with open(temp, 'r') as f: content = f.read() @@ -72,7 +72,7 @@ class AddDsymCommandCase(TestBase): '%ADD_EXTRA_CODE%', 'printf("This is version %d\\n");' % version) - src = os.path.join(os.getcwd(), self.source) + src = os.path.join(self.getBuildDir(), self.source) with open(src, 'w') as f: f.write(new_content) @@ -83,15 +83,18 @@ class AddDsymCommandCase(TestBase): def do_add_dsym_with_error(self, exe_name): """Test that the 'add-dsym' command informs the user about failures.""" - self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET) + exe_path = self.getBuildArtifact(exe_name) + self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET) - wrong_path = os.path.join("%s.dSYM" % exe_name, "Contents") + wrong_path = os.path.join(self.getBuildDir(), + "%s.dSYM" % exe_name, "Contents") self.expect("add-dsym " + wrong_path, error=True, substrs=['invalid module path']) right_path = os.path.join( + self.getBuildDir(), "%s.dSYM" % - exe_name, + exe_path, "Contents", "Resources", "DWARF", @@ -101,13 +104,15 @@ class AddDsymCommandCase(TestBase): 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) + exe_path = self.getBuildArtifact(exe_name) + self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET) # This time, the UUID should match and we expect some feedback from # lldb. right_path = os.path.join( + self.getBuildDir(), "%s.dSYM" % - exe_name, + exe_path, "Contents", "Resources", "DWARF", @@ -117,9 +122,10 @@ class AddDsymCommandCase(TestBase): 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) + exe_path = self.getBuildArtifact(exe_name) + self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET) # This time, the UUID should be found inside the bundle - right_path = "%s.dSYM" % exe_name + right_path = "%s.dSYM" % exe_path self.expect("add-dsym " + right_path, substrs=['symbol file', 'has been added to']) -- cgit v1.2.3