forked from OSchip/llvm-project
Added lldbsuite.lldb_test_root, switched formatter to use it.
llvm-svn: 254894
This commit is contained in:
parent
8cf5e3ae95
commit
1d3b5a3ac2
|
@ -18,3 +18,11 @@ def find_lldb_root():
|
||||||
|
|
||||||
# lldbsuite.lldb_root refers to the root of the git/svn source checkout
|
# lldbsuite.lldb_root refers to the root of the git/svn source checkout
|
||||||
lldb_root = find_lldb_root()
|
lldb_root = find_lldb_root()
|
||||||
|
|
||||||
|
# lldbsuite.lldb_test_root refers to the root of the python test tree
|
||||||
|
lldb_test_root = os.path.join(
|
||||||
|
lldb_root,
|
||||||
|
"packages",
|
||||||
|
"Python",
|
||||||
|
"lldbsuite",
|
||||||
|
"test")
|
||||||
|
|
|
@ -13,9 +13,8 @@ from __future__ import print_function
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# Our imports
|
# Our imports
|
||||||
|
|
||||||
from . import test_results
|
from . import test_results
|
||||||
|
import lldbsuite
|
||||||
|
|
||||||
class BasicResultsFormatter(test_results.ResultsFormatter):
|
class BasicResultsFormatter(test_results.ResultsFormatter):
|
||||||
"""Provides basic test result output."""
|
"""Provides basic test result output."""
|
||||||
|
@ -220,14 +219,12 @@ class BasicResultsFormatter(test_results.ResultsFormatter):
|
||||||
print_matching_tests = category[2]
|
print_matching_tests = category[2]
|
||||||
detail_label = category[3]
|
detail_label = category[3]
|
||||||
|
|
||||||
test_base_dir = os.path.realpath(os.path.dirname(__file__))
|
|
||||||
|
|
||||||
if print_matching_tests:
|
if print_matching_tests:
|
||||||
# Sort by test name
|
# Sort by test name
|
||||||
for (_, event) in result_events_by_status[result_status_id]:
|
for (_, event) in result_events_by_status[result_status_id]:
|
||||||
test_relative_path = os.path.relpath(
|
test_relative_path = os.path.relpath(
|
||||||
os.path.realpath(event["test_filename"]),
|
os.path.realpath(event["test_filename"]),
|
||||||
test_base_dir)
|
lldbsuite.lldb_test_root)
|
||||||
self.out_file.write("{}: {} ({})\n".format(
|
self.out_file.write("{}: {} ({})\n".format(
|
||||||
detail_label,
|
detail_label,
|
||||||
event["test_name"],
|
event["test_name"],
|
||||||
|
|
Loading…
Reference in New Issue