forked from OSchip/llvm-project
Wrapped the subclass-specific cleanup call within a try:except: clause.
And removed the informational output from the conditional_break test case. llvm-svn: 114493
This commit is contained in:
parent
6f8bd42ec7
commit
90312a8492
|
@ -57,7 +57,7 @@ class ConditionalBreakTestCase(TestBase):
|
|||
process = target.GetProcess()
|
||||
thread = process.GetThreadAtIndex(0)
|
||||
import lldbutil
|
||||
lldbutil.PrintStackTrace(thread)
|
||||
#lldbutil.PrintStackTrace(thread)
|
||||
|
||||
if thread.GetNumFrames() >= 2:
|
||||
frame0 = thread.GetFrameAtIndex(0)
|
||||
|
|
|
@ -24,15 +24,16 @@ def stop_if_called_from_a():
|
|||
# of the leaf function c() is a(). If it's not the right caller, we ask the
|
||||
# command interpreter to continue execution.
|
||||
|
||||
print >> sys.stdout, "Checking call frames..."
|
||||
lldbutil.PrintStackTrace(thread)
|
||||
#print >> sys.stdout, "Checking call frames..."
|
||||
#lldbutil.PrintStackTrace(thread)
|
||||
if thread.GetNumFrames() >= 2:
|
||||
funcs = lldbutil.GetFunctionNames(thread)
|
||||
print >> sys.stdout, funcs[0], "called from", funcs[1]
|
||||
#print >> sys.stdout, funcs[0], "called from", funcs[1]
|
||||
if (funcs[0] == 'c' and funcs[1] == 'a'):
|
||||
print >> sys.stdout, "Stopped at c() with immediate caller as a()."
|
||||
#print >> sys.stdout, "Stopped at c() with immediate caller as a()."
|
||||
pass
|
||||
else:
|
||||
print >> sys.stdout, "Continuing..."
|
||||
#print >> sys.stdout, "Continuing..."
|
||||
ci.HandleCommand("process continue", res)
|
||||
|
||||
return True
|
||||
|
|
|
@ -96,7 +96,7 @@ OK
|
|||
$
|
||||
"""
|
||||
|
||||
import os, sys
|
||||
import os, sys, traceback
|
||||
import re
|
||||
from subprocess import *
|
||||
import time
|
||||
|
@ -305,7 +305,11 @@ class TestBase(unittest2.TestCase):
|
|||
if getattr(cls, "classCleanup", None):
|
||||
if traceAlways:
|
||||
print "Call class-specific cleanup function for class:", cls
|
||||
cls.classCleanup()
|
||||
try:
|
||||
cls.classCleanup()
|
||||
except:
|
||||
exc_type, exc_value, exc_tb = sys.exc_info()
|
||||
traceback.print_exception(exc_type, exc_value, exc_tb)
|
||||
|
||||
# Restore old working directory.
|
||||
if traceAlways:
|
||||
|
|
Loading…
Reference in New Issue