[Lldb-commits] [lldb] r254894 - Added lldbsuite.lldb_test_root, switched formatter to use it.
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Sun Dec 6 22:19:48 PST 2015
Author: tfiala
Date: Mon Dec 7 00:19:48 2015
New Revision: 254894
URL: http://llvm.org/viewvc/llvm-project?rev=254894&view=rev
Log:
Added lldbsuite.lldb_test_root, switched formatter to use it.
Modified:
lldb/trunk/packages/Python/lldbsuite/__init__.py
lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py
Modified: lldb/trunk/packages/Python/lldbsuite/__init__.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/__init__.py?rev=254894&r1=254893&r2=254894&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/__init__.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/__init__.py Mon Dec 7 00:19:48 2015
@@ -18,3 +18,11 @@ def find_lldb_root():
# lldbsuite.lldb_root refers to the root of the git/svn source checkout
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")
Modified: lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py?rev=254894&r1=254893&r2=254894&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py Mon Dec 7 00:19:48 2015
@@ -13,9 +13,8 @@ from __future__ import print_function
import os
# Our imports
-
from . import test_results
-
+import lldbsuite
class BasicResultsFormatter(test_results.ResultsFormatter):
"""Provides basic test result output."""
@@ -220,14 +219,12 @@ class BasicResultsFormatter(test_results
print_matching_tests = category[2]
detail_label = category[3]
- test_base_dir = os.path.realpath(os.path.dirname(__file__))
-
if print_matching_tests:
# Sort by test name
for (_, event) in result_events_by_status[result_status_id]:
test_relative_path = os.path.relpath(
os.path.realpath(event["test_filename"]),
- test_base_dir)
+ lldbsuite.lldb_test_root)
self.out_file.write("{}: {} ({})\n".format(
detail_label,
event["test_name"],
More information about the lldb-commits
mailing list