diff options
author | Nicolas Catania <niko@google.com> | 2009-05-01 11:55:36 -0700 |
---|---|---|
committer | Nicolas Catania <niko@google.com> | 2009-05-02 09:10:44 -0700 |
commit | ff096c1b7b10fbaf7cf242a81d71b3887861b8ce (patch) | |
tree | 75fd094e0191c67fcf3716fcc2b1ceb6f40ed239 /testrunner/run_command.py | |
parent | 1ecf93b37a8739357877f305f399bcb4831c111a (diff) | |
download | android_development-ff096c1b7b10fbaf7cf242a81d71b3887861b8ce.tar.gz android_development-ff096c1b7b10fbaf7cf242a81d71b3887861b8ce.tar.bz2 android_development-ff096c1b7b10fbaf7cf242a81d71b3887861b8ce.zip |
Broaden the search for native test files.
Previously we were looking for test files with this pattern: test_*
I added *_test.[cc|cpp] and *_unittest.[cc|cpp]
The search also scan all the subdirectories of the build_path from
the test definition.
I added a filtering stage where missing tests are ignored.
For instance we may have a source file that has not been built for
the target, in which case it is ignored when we run the target tests.
In android_build.py I added 4 helper functions to get access to the
build environment:
- GetHostBin
- GetProductOut
- GetTargetSystemBin
- GetHostOsArch
Replace all the hardcoded linux-x86 strings with the value returned
by GetHostOsArch.
Diffstat (limited to 'testrunner/run_command.py')
-rwxr-xr-x | testrunner/run_command.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testrunner/run_command.py b/testrunner/run_command.py index 56085212c..44499457c 100755 --- a/testrunner/run_command.py +++ b/testrunner/run_command.py @@ -23,6 +23,7 @@ import threading import time # local imports +import android_build import errors import logger @@ -128,13 +129,13 @@ def RunHostCommand(binary, valgrind=False): Args: binary: basename of the file to be run. It is expected to be under - out/host/linux-x86/bin. + out/host/<os>-<arch>/bin. valgrind: If True the command will be run under valgrind. Returns: The command exit code (int) """ - full_path = os.path.join("out", "host", "linux-x86", "bin", binary) + full_path = os.path.join(android_build.GetHostBin(), binary) if not valgrind: subproc = subprocess.Popen(full_path, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |