[Lldb-commits] [PATCH] D57275: [testsuite] Remove seven dependency

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 28 08:56:42 PST 2019


JDevlieghere updated this revision to Diff 183877.
JDevlieghere added a comment.

- Remove trailing characters from get_command_status_output.
- Remove unused seven imports.

(I'll land this as two separate commits)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57275/new/

https://reviews.llvm.org/D57275

Files:
  packages/Python/lldbsuite/support/seven.py
  packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
  packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
  packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py


Index: packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
===================================================================
--- packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
+++ packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
@@ -10,21 +10,11 @@
 import re
 
 import lldb
-from lldbsuite.support import seven
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
 
-def execute_command(command):
-    # print('%% %s' % (command))
-    (exit_status, output) = seven.get_command_status_output(command)
-    # if output:
-    #     print(output)
-    # print('status = %u' % (exit_status))
-    return exit_status
-
-
 class ObjCiVarIMPTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
Index: packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
+++ packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
@@ -7,7 +7,6 @@
 import lldb
 import os
 import time
-import lldbsuite.support.seven as seven
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
Index: packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
+++ packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
@@ -7,21 +7,11 @@
 import lldb
 import os
 import time
-from lldbsuite.support import seven
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
 
-def execute_command(command):
-    #print('%% %s' % (command))
-    (exit_status, output) = seven.get_command_status_output(command)
-    # if output:
-    #    print(output)
-    #print('status = %u' % (exit_status))
-    return exit_status
-
-
 class ExecTestCase(TestBase):
 
     NO_DEBUG_INFO_TESTCASE = True
Index: packages/Python/lldbsuite/support/seven.py
===================================================================
--- packages/Python/lldbsuite/support/seven.py
+++ packages/Python/lldbsuite/support/seven.py
@@ -15,7 +15,7 @@
                 subprocess.check_output(
                     command,
                     shell=True,
-                    universal_newlines=True))
+                    universal_newlines=True).rstrip())
         except subprocess.CalledProcessError as e:
             return (e.returncode, e.output)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57275.183877.patch
Type: text/x-patch
Size: 2701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190128/7e4e1db1/attachment.bin>


More information about the lldb-commits mailing list