forked from OSchip/llvm-project
[lldb] Update TestMultithreaded to report FAIL for a non-zero exit code
A non-zero exit code from the test binary results in a CalledProcessError. Without catching the exception, that would result in a error (unresolved test) instead of a failure. This patch fixes that.
This commit is contained in:
parent
d3202a5923
commit
37028d3ea7
|
@ -108,12 +108,15 @@ class SBBreakpointCallbackCase(TestBase):
|
||||||
env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
|
env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
|
||||||
if 'LLDB_DEBUGSERVER_PATH' in os.environ:
|
if 'LLDB_DEBUGSERVER_PATH' in os.environ:
|
||||||
env['LLDB_DEBUGSERVER_PATH'] = os.environ['LLDB_DEBUGSERVER_PATH']
|
env['LLDB_DEBUGSERVER_PATH'] = os.environ['LLDB_DEBUGSERVER_PATH']
|
||||||
if self.TraceOn():
|
try:
|
||||||
print("Running test %s" % " ".join(exe))
|
if self.TraceOn():
|
||||||
check_call(exe, env=env)
|
print("Running test %s" % " ".join(exe))
|
||||||
else:
|
check_call(exe, env=env)
|
||||||
with open(os.devnull, 'w') as fnull:
|
else:
|
||||||
check_call(exe, env=env, stdout=fnull, stderr=fnull)
|
with open(os.devnull, 'w') as fnull:
|
||||||
|
check_call(exe, env=env, stdout=fnull, stderr=fnull)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
self.fail(e)
|
||||||
|
|
||||||
def build_program(self, sources, program):
|
def build_program(self, sources, program):
|
||||||
return self.buildDriver(sources, program)
|
return self.buildDriver(sources, program)
|
||||||
|
|
Loading…
Reference in New Issue