diff --git a/Code/Tools/TestViewer/.pydevproject b/Code/Tools/TestViewer/.pydevproject index 27936290b431708bf9b8c7f593a7548ab3715423..8dd56925a2b1b1a9067f73817a0a9ef76ec0a6d4 100644 --- a/Code/Tools/TestViewer/.pydevproject +++ b/Code/Tools/TestViewer/.pydevproject @@ -5,6 +5,6 @@ <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property> <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> -<path>/TestViewer/src</path> +<path>/TestViewer</path> </pydev_pathproperty> </pydev_project> diff --git a/Code/Tools/TestViewer/test_info.py b/Code/Tools/TestViewer/test_info.py index 27313a23b7a1750869ed5fe52feedd3da128a3b5..499c1b85b01f0c0585da1917265b1f50f14e500e 100644 --- a/Code/Tools/TestViewer/test_info.py +++ b/Code/Tools/TestViewer/test_info.py @@ -670,10 +670,7 @@ class TestProject(object): """ Find the source file corresponding to the given suite in this project Returns: the full path to the test file. """ - source_base_dir = "/home/8oz/Code/Mantid/Code/Mantid/Framework/" - project_name = self.name.replace("Test", "") - source_dir = os.path.join(source_base_dir, project_name) - return os.path.join( source_dir, "test/" + suite_name + ".h") + return os.path.join( self.source_path, "test/" + suite_name + ".h") #---------------------------------------------------------------------------------- @@ -716,9 +713,12 @@ class TestProject(object): return self.state.get_string() + " (%d)" % (self.num_run) #, self.num_run) #---------------------------------------------------------------------------------- - def populate(self): - """ Discover the suites and single tests in this test project. """ + def populate(self, project_source_path): + """ Discover the suites and single tests in this test project. + @param project_source_path :: root path to the project. e.g. Framework/Kernel + """ self.suites = [] + self.source_path = project_source_path # CXX test simply lists "TestSuite testName" last_suite_name = "" @@ -932,7 +932,11 @@ class MultipleProjects(object): make_command = "cd %s ; make %s -j%d " % (os.path.join(path, ".."), fname, num_threads) pj = TestProject(fname, os.path.join(path, fname), make_command) print "... Populating project %s ..." % fname - pj.populate() + + project_name = fname.replace("Test", "") + project_source_path = os.path.join(source_path, project_name) + + pj.populate(project_source_path) self.projects.append(pj) #--------------------------------------------------------------------------