Added lldbsuite.lldb_test_root, switched formatter to use it.

llvm-svn: 254894
diff --git a/lldb/packages/Python/lldbsuite/__init__.py b/lldb/packages/Python/lldbsuite/__init__.py
index fb65606..aa6874e 100644
--- a/lldb/packages/Python/lldbsuite/__init__.py
+++ b/lldb/packages/Python/lldbsuite/__init__.py
@@ -18,3 +18,11 @@
 
 # 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")
diff --git a/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py b/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
index ae4e0c6..4a8d0c8 100644
--- a/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
+++ b/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
@@ -13,9 +13,8 @@
 import os
 
 # Our imports
-
 from . import test_results
-
+import lldbsuite
 
 class BasicResultsFormatter(test_results.ResultsFormatter):
     """Provides basic test result output."""
@@ -220,14 +219,12 @@
         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"],