1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #8043 from miri64/testrunner/fix/downwards-compatible

testrunner: make traceback extraction downwards-compatible
This commit is contained in:
Cenk Gündoğan 2017-11-15 15:36:29 +01:00 committed by GitHub
commit 17cad6a1e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,11 +24,11 @@ def list_until(l, cond):
def find_exc_origin(exc_info):
pos = list_until(extract_tb(exc_info),
lambda frame: frame.filename.startswith(PEXPECT_PATH)
lambda frame: frame[0].startswith(PEXPECT_PATH)
)[-1]
return pos.line, \
os.path.relpath(os.path.abspath(pos.filename), RIOTBASE), \
pos.lineno
return pos[3], \
os.path.relpath(os.path.abspath(pos[0]), RIOTBASE), \
pos[1]
def run(testfunc, timeout=10, echo=True, traceback=False):
env = os.environ.copy()