Skip to content

Commit

Permalink
[dotest] Remove crashinfo hook
Browse files Browse the repository at this point in the history
Summary:
This used to be important when all tests were run in a single process,
but that has no longer been the case for a while. Furthermore, this hook fails
to build on new mac versions for several people, and it's not clear
whether fixing it is worth the effort.

Reviewers: jingham, clayborg, davide

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D41871

llvm-svn: 322167
  • Loading branch information
labath committed Jan 10, 2018
1 parent 886510f commit 698d63a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 108 deletions.
6 changes: 0 additions & 6 deletions lldb/.gitignore
Expand Up @@ -37,8 +37,6 @@ ninja/
*xcuserdata
test/20*
__pycache__/
*.lock
*.so

clang-module-cache

Expand All @@ -53,7 +51,3 @@ tags
# Ignore test trace directories.
20??-??-??-??_??_??/

# Ignore crashlog support files.
crashinfo.lock
crashinfo.so

34 changes: 0 additions & 34 deletions lldb/packages/Python/lldbsuite/test/configuration.py
Expand Up @@ -24,40 +24,6 @@
import lldbsuite


def __setCrashInfoHook_Mac(text):
from . import crashinfo
crashinfo.setCrashReporterDescription(text)


def setupCrashInfoHook():
if platform.system() == "Darwin":
from . import lock
test_dir = os.environ['LLDB_TEST']
if not test_dir or not os.path.exists(test_dir):
return
dylib_lock = os.path.join(test_dir, "crashinfo.lock")
dylib_src = os.path.join(test_dir, "crashinfo.c")
dylib_dst = os.path.join(test_dir, "crashinfo.so")
try:
compile_lock = lock.Lock(dylib_lock)
compile_lock.acquire()
if not os.path.isfile(dylib_dst) or os.path.getmtime(
dylib_dst) < os.path.getmtime(dylib_src):
# we need to compile
cmd = "SDKROOT= xcrun clang %s -o %s -framework Python -Xlinker -dylib" % (
dylib_src, dylib_dst)
if subprocess.call(
cmd, shell=True) != 0 or not os.path.isfile(dylib_dst):
raise Exception('command failed: "{}"'.format(cmd))
finally:
compile_lock.release()
del compile_lock

setCrashInfoHook = __setCrashInfoHook_Mac

else:
pass

# The test suite.
suite = unittest2.TestSuite()

Expand Down
64 changes: 0 additions & 64 deletions lldb/packages/Python/lldbsuite/test/crashinfo.c

This file was deleted.

1 change: 0 additions & 1 deletion lldb/packages/Python/lldbsuite/test/dotest.py
Expand Up @@ -1117,7 +1117,6 @@ def run_suite():
signal.signal(signal.SIGINT, signal.SIG_IGN)

setupSysPath()
configuration.setupCrashInfoHook()

#
# If '-l' is specified, do not skip the long running tests.
Expand Down
3 changes: 0 additions & 3 deletions lldb/packages/Python/lldbsuite/test/test_result.py
Expand Up @@ -171,9 +171,6 @@ def startTest(self, test):
(str(test), inspect.getfile(
test.__class__)))
self.counter += 1
# if self.counter == 4:
# import crashinfo
# crashinfo.testCrashReporterDescription(None)
test.test_number = self.counter
if self.showAll:
self.stream.write(self.fmt % self.counter)
Expand Down

0 comments on commit 698d63a

Please sign in to comment.