Remove runtest dependency on current dir being build top.
This change is necessary to support relative path based args.
This commit is contained in:
@@ -221,7 +221,10 @@ class TestRunner(object):
|
|||||||
self._options.make_jobs)
|
self._options.make_jobs)
|
||||||
logger.Log(cmd)
|
logger.Log(cmd)
|
||||||
if not self._options.preview:
|
if not self._options.preview:
|
||||||
|
old_dir = os.getcwd()
|
||||||
|
os.chdir(self._root_path)
|
||||||
run_command.RunCommand(cmd, return_output=False)
|
run_command.RunCommand(cmd, return_output=False)
|
||||||
|
os.chdir(old_dir)
|
||||||
target_build_string = " ".join(list(target_set))
|
target_build_string = " ".join(list(target_set))
|
||||||
extra_args_string = " ".join(list(extra_args_set))
|
extra_args_string = " ".join(list(extra_args_set))
|
||||||
# mmm cannot be used from python, so perform a similar operation using
|
# mmm cannot be used from python, so perform a similar operation using
|
||||||
@@ -253,6 +256,8 @@ class TestRunner(object):
|
|||||||
if os.path.isfile(os.path.join(self._root_path, build_file_path)):
|
if os.path.isfile(os.path.join(self._root_path, build_file_path)):
|
||||||
target_set.add(build_file_path)
|
target_set.add(build_file_path)
|
||||||
return True
|
return True
|
||||||
|
else:
|
||||||
|
logger.Log("%s has no Android.mk, skipping" % build_dir)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _GetTestsToRun(self):
|
def _GetTestsToRun(self):
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class NativeTestSuite(test_suite.AbstractTestSuite):
|
|||||||
# find all test files, convert unicode names to ascii, take the basename
|
# find all test files, convert unicode names to ascii, take the basename
|
||||||
# and drop the .cc/.cpp extension.
|
# and drop the .cc/.cpp extension.
|
||||||
source_list = []
|
source_list = []
|
||||||
build_path = self.GetBuildPath()
|
build_path = os.path.join(android_build.GetTop(), self.GetBuildPath())
|
||||||
os.path.walk(build_path, self._CollectTestSources, source_list)
|
os.path.walk(build_path, self._CollectTestSources, source_list)
|
||||||
logger.SilentLog("Tests source %s" % source_list)
|
logger.SilentLog("Tests source %s" % source_list)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user