Remove runtest dependency on current dir being build top.
This change is necessary to support relative path based args.
diff --git a/testrunner/runtest.py b/testrunner/runtest.py
index e637b71..b6938cd 100755
--- a/testrunner/runtest.py
+++ b/testrunner/runtest.py
@@ -221,7 +221,10 @@
self._options.make_jobs)
logger.Log(cmd)
if not self._options.preview:
+ old_dir = os.getcwd()
+ os.chdir(self._root_path)
run_command.RunCommand(cmd, return_output=False)
+ os.chdir(old_dir)
target_build_string = " ".join(list(target_set))
extra_args_string = " ".join(list(extra_args_set))
# mmm cannot be used from python, so perform a similar operation using
@@ -253,6 +256,8 @@
if os.path.isfile(os.path.join(self._root_path, build_file_path)):
target_set.add(build_file_path)
return True
+ else:
+ logger.Log("%s has no Android.mk, skipping" % build_dir)
return False
def _GetTestsToRun(self):
diff --git a/testrunner/test_defs/native_test.py b/testrunner/test_defs/native_test.py
index ad7352a..e6917c9 100644
--- a/testrunner/test_defs/native_test.py
+++ b/testrunner/test_defs/native_test.py
@@ -52,7 +52,7 @@
# find all test files, convert unicode names to ascii, take the basename
# and drop the .cc/.cpp extension.
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)
logger.SilentLog("Tests source %s" % source_list)