diff options
author | Brett Chabot <brettchabot@google.com> | 2009-06-25 17:57:31 -0700 |
---|---|---|
committer | Brett Chabot <brettchabot@google.com> | 2009-06-26 14:31:52 -0700 |
commit | 764d3fa70d42a79e2ee999b790e69fc55f12bf61 (patch) | |
tree | 99033717a6c33ed44ea70edf3d04918f91e5550e /testrunner/android_build.py | |
parent | e860ea067609d5cd33bce04a0536600961aceb4a (diff) | |
download | android_development-764d3fa70d42a79e2ee999b790e69fc55f12bf61.tar.gz android_development-764d3fa70d42a79e2ee999b790e69fc55f12bf61.tar.bz2 android_development-764d3fa70d42a79e2ee999b790e69fc55f12bf61.zip |
Add support for running host java tests to runtest.
With this change, also refactored runtest as follows: Modified the
test suite schema and python implementation to have an inheritance
structure. Each test type has its own python module, which will
also handle the logic of running the test.
Diffstat (limited to 'testrunner/android_build.py')
-rw-r--r-- | testrunner/android_build.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testrunner/android_build.py b/testrunner/android_build.py index 976f2bb1f..37ddf9e65 100644 --- a/testrunner/android_build.py +++ b/testrunner/android_build.py @@ -133,3 +133,44 @@ def GetTargetSystemBin(): logger.Log("Error: Target system bin path could not be found") raise errors.AbortError return path + +def GetHostLibraryPath(): + """Returns the full pathname to the host java library output directory. + + Typically $ANDROID_BUILD_TOP/out/host/<host_os>/framework. + + Assumes build environment has been properly configured by envsetup & + lunch/choosecombo. + + Returns: + The absolute file path of the Android host java library directory. + + Raises: + AbortError: if Android host java library directory could not be found. + """ + (_, _, os_arch) = GetHostOsArch() + path = os.path.join(GetTop(), "out", "host", os_arch, "framework") + if not os.path.exists(path): + logger.Log("Error: Host library path could not be found %s" % path) + raise errors.AbortError + return path + +def GetTestAppPath(): + """Returns the full pathname to the test app build output directory. + + Typically $ANDROID_PRODUCT_OUT/data/app + + Assumes build environment has been properly configured by envsetup & + lunch/choosecombo. + + Returns: + The absolute file path of the Android test app build directory. + + Raises: + AbortError: if Android host java library directory could not be found. + """ + path = os.path.join(GetProductOut(), "data", "app") + if not os.path.exists(path): + logger.Log("Error: app path could not be found %s" % path) + raise errors.AbortError + return path |