[Lldb-commits] [lldb] r373804 - [test] Run TestLaunchWithShellExpand with /bin/sh on POSIX.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 4 15:21:35 PDT 2019


Author: jdevlieghere
Date: Fri Oct  4 15:21:35 2019
New Revision: 373804

URL: http://llvm.org/viewvc/llvm-project?rev=373804&view=rev
Log:
[test] Run TestLaunchWithShellExpand with /bin/sh on POSIX.

Now that we do shell expansion on POSIX with the user's shel, this test
can potentially fail. This should ensure that we always use /bin/sh.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py?rev=373804&r1=373803&r2=373804&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py Fri Oct  4 15:21:35 2019
@@ -2,6 +2,7 @@
 Test that argdumper is a viable launching strategy.
 """
 from __future__ import print_function
+import os
 
 
 import lldb
@@ -36,6 +37,9 @@ class LaunchWithShellExpandTestCase(Test
             'break here', lldb.SBFileSpec("main.cpp", False))
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
+        # Ensure we do the expansion with /bin/sh on POSIX.
+        os.environ["SHELL"] = '/bin/sh'
+
         self.runCmd(
             "process launch -X true -w %s -- fi*.tx? () > <" %
             (self.getSourceDir()))




More information about the lldb-commits mailing list