[Lldb-commits] [lldb] r367079 - [dotest] Remove dead code
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 25 18:58:18 PDT 2019
Author: jdevlieghere
Date: Thu Jul 25 18:58:18 2019
New Revision: 367079
URL: http://llvm.org/viewvc/llvm-project?rev=367079&view=rev
Log:
[dotest] Remove dead code
Remove some dead code that I ran into when preparing D65311.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/decorators.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/lldbplatform.py
lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=367079&r1=367078&r2=367079&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Thu Jul 25 18:58:18 2019
@@ -2,9 +2,8 @@ from __future__ import absolute_import
from __future__ import print_function
# System modules
-from distutils.version import LooseVersion, StrictVersion
+from distutils.version import LooseVersion
from functools import wraps
-import inspect
import os
import platform
import re
@@ -17,8 +16,6 @@ import six
import unittest2
# LLDB modules
-import use_lldb_suite
-
import lldb
from . import configuration
from . import test_categories
Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=367079&r1=367078&r2=367079&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Jul 25 18:58:18 2019
@@ -29,7 +29,6 @@ import logging
import platform
import re
import signal
-import socket
import subprocess
import sys
@@ -58,7 +57,7 @@ def is_exe(fpath):
def which(program):
"""Returns the full path to a program; None otherwise."""
- fpath, fname = os.path.split(program)
+ fpath, _ = os.path.split(program)
if fpath:
if is_exe(program):
return program
@@ -70,27 +69,6 @@ def which(program):
return None
-class _WritelnDecorator(object):
- """Used to decorate file-like objects with a handy 'writeln' method"""
-
- def __init__(self, stream):
- self.stream = stream
-
- def __getattr__(self, attr):
- if attr in ('stream', '__getstate__'):
- raise AttributeError(attr)
- return getattr(self.stream, attr)
-
- def writeln(self, arg=None):
- if arg:
- self.write(arg)
- self.write('\n') # text-mode streams translate to \r\n if needed
-
-#
-# Global variables:
-#
-
-
def usage(parser):
parser.print_help()
if configuration.verbose > 0:
@@ -558,17 +536,6 @@ def getXcodeOutputPaths(lldbRootDirector
return result
-def createSocketToLocalPort(port):
- def socket_closer(s):
- """Close down an opened socket properly."""
- s.shutdown(socket.SHUT_RDWR)
- s.close()
-
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sock.connect(("localhost", port))
- return (sock, lambda: socket_closer(sock))
-
-
def setupTestResults():
"""Sets up test results-related objects based on arg settings."""
# Setup the results formatter configuration.
@@ -639,7 +606,7 @@ def getOutputPaths(lldbRootDirectory):
def get_llvm_bin_dirs():
"""
Returns an array of paths that may have the llvm/clang/etc binaries
- in them, relative to this current file.
+ in them, relative to this current file.
Returns an empty array if none are found.
"""
result = []
@@ -1090,14 +1057,6 @@ def getVersionForSDK(sdk):
return ver
-def getPathForSDK(sdk):
- sdk = str.lower(sdk)
- full_path = seven.get_command_output('xcrun -sdk %s --show-sdk-path' % sdk)
- if os.path.exists(full_path):
- return full_path
- return None
-
-
def setDefaultTripleForPlatform():
if configuration.lldb_platform_name == 'ios-simulator':
triple_str = 'x86_64-apple-ios%s' % (
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbplatform.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbplatform.py?rev=367079&r1=367078&r2=367079&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbplatform.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbplatform.py Thu Jul 25 18:58:18 2019
@@ -9,7 +9,6 @@ import itertools
import six
# LLDB modules
-import use_lldb_suite
import lldb
windows, linux, macosx, darwin, ios, tvos, watchos, bridgeos, darwin_all, darwin_embedded, freebsd, netbsd, bsd_all, android = range(
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py?rev=367079&r1=367078&r2=367079&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py Thu Jul 25 18:58:18 2019
@@ -16,7 +16,6 @@ from six.moves.urllib import parse as ur
# LLDB modules
from . import configuration
-import use_lldb_suite
import lldb
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=367079&r1=367078&r2=367079&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Jul 25 18:58:18 2019
@@ -51,7 +51,6 @@ from subprocess import *
import sys
import time
import traceback
-import types
import distutils.spawn
# Third-party modules
@@ -61,7 +60,6 @@ from six import StringIO as SixStringIO
import six
# LLDB modules
-import use_lldb_suite
import lldb
from . import configuration
from . import decorators
More information about the lldb-commits
mailing list