mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 07:57:36 +08:00
Fix test rerun logic
result_formatter used inspect.getfile() to get the python file name, which returned "*.pyc" if the bytecode file was present. This resulted in files being displayed with the wrong extension, and more critically, would confuse the rerun logic because it would try to rerun the pyc file (which resulted in an empty rerun list as unittest refused to run those). Fix: use inspect.getsourcefile() instead. I am not sure why does was not an issue before. I can only assume that some system update tricked python into producing bytecode files more aggressively. llvm-svn: 266192
This commit is contained in:
@@ -247,7 +247,7 @@ class EventBuilder(object):
|
||||
if hasattr(test, "test_filename"):
|
||||
test_filename = test.test_filename
|
||||
else:
|
||||
test_filename = inspect.getfile(test.__class__)
|
||||
test_filename = inspect.getsourcefile(test.__class__)
|
||||
|
||||
event = EventBuilder.bare_event(event_type)
|
||||
event.update({
|
||||
|
||||
Reference in New Issue
Block a user