[Lldb-commits] [lldb] 311b247 - [lldb] Remove stale LLDB-Info.plist

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 8 10:12:23 PST 2021


Author: Jonas Devlieghere
Date: 2021-01-08T10:12:16-08:00
New Revision: 311b247c9fb58ee476184a7eb8044b8f54f95035

URL: https://github.com/llvm/llvm-project/commit/311b247c9fb58ee476184a7eb8044b8f54f95035
DIFF: https://github.com/llvm/llvm-project/commit/311b247c9fb58ee476184a7eb8044b8f54f95035.diff

LOG: [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.

Added: 
    

Modified: 
    lldb/test/API/commands/help/TestHelp.py

Removed: 
    lldb/resources/LLDB-Info.plist


################################################################################
diff  --git a/lldb/resources/LLDB-Info.plist b/lldb/resources/LLDB-Info.plist
deleted file mode 100644
index 77330e2929cb..000000000000
--- a/lldb/resources/LLDB-Info.plist
+++ /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>

diff  --git a/lldb/test/API/commands/help/TestHelp.py b/lldb/test/API/commands/help/TestHelp.py
index f671fc7ad5f4..2e849fb768a7 100644
--- a/lldb/test/API/commands/help/TestHelp.py
+++ b/lldb/test/API/commands/help/TestHelp.py
@@ -36,44 +36,6 @@ def test_help_on_help(self):
                     substrs=['--hide-aliases',
                              '--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."""
@@ -85,13 +47,8 @@ def test_help_version(self):
         """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):


        


More information about the lldb-commits mailing list