From 9fb77fcfef393a3a481d2fc534b76ee22531798f Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 13 Apr 2016 12:05:48 +0000 Subject: 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 --- lldb/packages/Python/lldbsuite/test/result_formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test/result_formatter.py') diff --git a/lldb/packages/Python/lldbsuite/test/result_formatter.py b/lldb/packages/Python/lldbsuite/test/result_formatter.py index 44474918895..070fa6c1440 100644 --- a/lldb/packages/Python/lldbsuite/test/result_formatter.py +++ b/lldb/packages/Python/lldbsuite/test/result_formatter.py @@ -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({ -- cgit v1.2.3