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)
 


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)
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to