From: Jonas Devlieghere Date: Fri, 8 Jan 2021 17:43:08 +0000 (-0800) Subject: [lldb] Remove stale LLDB-Info.plist X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=311b247c9fb58ee476184a7eb8044b8f54f95035;p=android-x86%2Fexternal-llvm-project.git [lldb] Remove stale LLDB-Info.plist Remove the stale LLDB-Info.plist which was only used by TestHelp.py. The latter would try to parse the version number from the plist and use that to verify the version in the help output. Of course this never matched so it would fall back to matching any arbitrary version. This patch does *not* change the real LLDB-Info.plist.in file which is used for the LLDB Framework. --- diff --git a/lldb/resources/LLDB-Info.plist b/lldb/resources/LLDB-Info.plist deleted file mode 100644 index 77330e2929c..00000000000 --- a/lldb/resources/LLDB-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.apple.${PRODUCT_NAME}.framework - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.${CURRENT_PROJECT_VERSION} - CFBundleSignature - ???? - CFBundleVersion - 360.99.0 - CFBundleName - ${EXECUTABLE_NAME} - - diff --git a/lldb/test/API/commands/help/TestHelp.py b/lldb/test/API/commands/help/TestHelp.py index f671fc7ad5f..2e849fb768a 100644 --- a/lldb/test/API/commands/help/TestHelp.py +++ b/lldb/test/API/commands/help/TestHelp.py @@ -37,44 +37,6 @@ class HelpCommandTestCase(TestBase): '--hide-user-commands']) @no_debug_info_test - def version_number_string(self): - """Helper function to find the version number string of lldb.""" - plist = os.path.join( - os.environ["LLDB_SRC"], - "resources", - "LLDB-Info.plist") - try: - CFBundleVersionSegFound = False - with open(plist, 'r') as f: - for line in f: - if CFBundleVersionSegFound: - version_line = line.strip() - import re - m = re.match("(.*)", version_line) - if m: - version = m.group(1) - return version - else: - # Unsuccessful, let's juts break out of the for - # loop. - break - - if line.find("CFBundleVersion") != -1: - # Found our match. The next line contains our version - # string, for example: - # - # 38 - CFBundleVersionSegFound = True - - except: - # Just fallthrough... - import traceback - traceback.print_exc() - - # Use None to signify that we are not able to grok the version number. - return None - - @no_debug_info_test def test_help_arch(self): """Test 'help arch' which should list of supported architectures.""" self.expect("help arch", @@ -85,13 +47,8 @@ class HelpCommandTestCase(TestBase): """Test 'help version' and 'version' commands.""" self.expect("help version", substrs=['Show the LLDB debugger version.']) - import re - version_str = self.version_number_string() - match = re.match('[0-9]+', version_str) - search_regexp = ['lldb( version|-' + (version_str if match else '[0-9]+') + ').*\n'] - self.expect("version", - patterns=search_regexp) + patterns=['lldb( version|-[0-9]+).*\n']) @no_debug_info_test def test_help_should_not_crash_lldb(self):