OSDN Git Service

[lldb] Remove stale LLDB-Info.plist
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 8 Jan 2021 17:43:08 +0000 (09:43 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 8 Jan 2021 18:12:16 +0000 (10:12 -0800)
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.

lldb/resources/LLDB-Info.plist [deleted file]
lldb/test/API/commands/help/TestHelp.py

diff --git a/lldb/resources/LLDB-Info.plist b/lldb/resources/LLDB-Info.plist
deleted file mode 100644 (file)
index 77330e2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>English</string>
-       <key>CFBundleExecutable</key>
-       <string>${EXECUTABLE_NAME}</string>
-       <key>CFBundleIdentifier</key>
-       <string>com.apple.${PRODUCT_NAME}.framework</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundlePackageType</key>
-       <string>FMWK</string>
-       <key>CFBundleShortVersionString</key>
-       <string>1.${CURRENT_PROJECT_VERSION}</string>
-       <key>CFBundleSignature</key>
-       <string>????</string>
-       <key>CFBundleVersion</key>
-       <string>360.99.0</string>
-       <key>CFBundleName</key>
-       <string>${EXECUTABLE_NAME}</string>
-</dict>
-</plist>
index f671fc7..2e849fb 100644 (file)
@@ -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("<string>(.*)</string>", 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("<key>CFBundleVersion</key>") != -1:
-                        # Found our match.  The next line contains our version
-                        # string, for example:
-                        #
-                        #     <string>38</string>
-                        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):