Lines Matching refs:path

34   def FindTests(self, path):  argument
71 if not os.path.exists(path):
72 logger.Log('%s does not exist' % path)
74 realpath = os.path.realpath(path)
76 self._build_top = os.path.realpath(android_build.GetTop())
79 (path, self._build_top))
86 logger.SilentLog('No tests found within %s, searching upwards' % path)
90 def _IsPathInBuildTree(self, path): argument
99 return os.path.commonprefix([self._build_top, path]) == self._build_top
101 def _MakePathRelativeToBuild(self, path): argument
113 if not self._IsPathInBuildTree(path):
117 return path[build_path_len:]
119 def _FindSubTests(self, path, tests, upstream_build_path=None): argument
131 if not os.path.isdir(path):
133 android_mk_parser = android_mk.CreateAndroidMK(path)
135 build_rel_path = self._MakePathRelativeToBuild(path)
140 android_mk_parser, path, build_rel_path))
142 tests.extend(self._CreateSuites(android_mk_parser, path,
158 upstream_build_path = self._MakePathRelativeToBuild(path)
161 for filename in os.listdir(path):
162 self._FindSubTests(os.path.join(path, filename), tests,
166 def _FindUpstreamTests(self, path): argument
175 factory = self._FindUpstreamTestFactory(path)
177 return factory.CreateTests(sub_tests_path=path)
181 def _GetTestFactory(self, android_mk_parser, path, build_path): argument
197 return gtest.GTestFactory(path, build_path)
198 elif instrumentation_test.HasInstrumentationTest(path):
199 return instrumentation_test.InstrumentationTestFactory(path,
204 % path)
208 def _GetTestFactoryForPath(self, path): argument
220 android_mk_parser = android_mk.CreateAndroidMK(path)
222 build_path = self._MakePathRelativeToBuild(path)
223 return self._GetTestFactory(android_mk_parser, path, build_path)
227 def _FindUpstreamTestFactory(self, path): argument
236 factory = self._GetTestFactoryForPath(path)
239 dirpath = os.path.dirname(path)
240 if self._IsPathInBuildTree(path):
245 def _CreateSuites(self, android_mk_parser, path, upstream_build_path): argument
258 factory = self._GetTestFactory(android_mk_parser, path,
261 return factory.CreateTests(path)