Merge pull request #8043 from miri64/testrunner/fix/downwards-compatible
testrunner: make traceback extraction downwards-compatible
This commit is contained in:
commit
17cad6a1e0
8
dist/tools/testrunner/testrunner.py
vendored
8
dist/tools/testrunner/testrunner.py
vendored
@ -24,11 +24,11 @@ def list_until(l, cond):
|
|||||||
|
|
||||||
def find_exc_origin(exc_info):
|
def find_exc_origin(exc_info):
|
||||||
pos = list_until(extract_tb(exc_info),
|
pos = list_until(extract_tb(exc_info),
|
||||||
lambda frame: frame.filename.startswith(PEXPECT_PATH)
|
lambda frame: frame[0].startswith(PEXPECT_PATH)
|
||||||
)[-1]
|
)[-1]
|
||||||
return pos.line, \
|
return pos[3], \
|
||||||
os.path.relpath(os.path.abspath(pos.filename), RIOTBASE), \
|
os.path.relpath(os.path.abspath(pos[0]), RIOTBASE), \
|
||||||
pos.lineno
|
pos[1]
|
||||||
|
|
||||||
def run(testfunc, timeout=10, echo=True, traceback=False):
|
def run(testfunc, timeout=10, echo=True, traceback=False):
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user