diff options
author | nileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 03:46:39 +0000 |
---|---|---|
committer | nileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 03:46:39 +0000 |
commit | 5c5b0d4df9d301521787f988a7b3bedc4ba9f3c6 (patch) | |
tree | 981756e975ee455dfc8513a2b5360aea3817f277 /build | |
parent | 574acb04aaf6cfb8156ec3ba05e62a0e5033e993 (diff) | |
download | chromium_src-5c5b0d4df9d301521787f988a7b3bedc4ba9f3c6.zip chromium_src-5c5b0d4df9d301521787f988a7b3bedc4ba9f3c6.tar.gz chromium_src-5c5b0d4df9d301521787f988a7b3bedc4ba9f3c6.tar.bz2 |
Run APK tests on the android_test trybot.
Test failures are ignored for now.
TBR=mark@chromium.org,tsepez@chromium.org
BUG=125059
TEST=
Review URL: https://chromiumcodereview.appspot.com/10387086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/android/buildbot_functions.sh | 27 | ||||
-rwxr-xr-x | build/android/buildbot_try_compile_test.sh | 3 | ||||
-rwxr-xr-x | build/android/run_tests.py | 13 |
3 files changed, 27 insertions, 16 deletions
diff --git a/build/android/buildbot_functions.sh b/build/android/buildbot_functions.sh index 2ea50f3..1db548e 100755 --- a/build/android/buildbot_functions.sh +++ b/build/android/buildbot_functions.sh @@ -194,23 +194,12 @@ function bb_compile { # Re-gyp and compile with unit test bundles configured as shlibs for # the native test runner. Experimental for now. Once the native test # loader is on by default, this entire function becomes obsolete. -function bb_native_test_compile_run_tests { +function bb_compile_apk_tests { echo "@@@BUILD_STEP Re-gyp for the native test runner@@@" GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp echo "@@@BUILD_STEP Native test runner compile@@@" bb_goma_make - - # Make sure running the template prints an expected failure. - echo "@@@BUILD_STEP Native test runner template test@@@" - tempfile=/tmp/tempfile-$$.txt - build/android/run_tests.py --xvfb --verbose \ - -s out/Release/replaceme_apk/replaceme-debug.apk \ - | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile - happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) - if [[ $happy_failure -eq 0 ]] ; then - echo "@@@STEP_WARNINGS@@@" - fi } # Experimental compile step; does not turn the tree red if it fails. @@ -239,3 +228,17 @@ function bb_run_tests { echo "@@@BUILD_STEP Run Tests on actual hardware@@@" build/android/run_tests.py --xvfb --verbose } + +# Run APK tests on an actual device. +function bb_run_apk_tests { + echo "@@@BUILD_STEP Run APK Tests on actual hardware@@@" + tempfile=/tmp/tempfile-$$.txt + # Filter out STEP_FAILURES, we don't want REDNESS on test failures for now. + build/android/run_tests.py --xvfb --verbose --apk=True \ + | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile + happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) + if [[ $happy_failure -eq 0 ]] ; then + echo "@@@STEP_WARNINGS@@@" + fi + rm -f $tempfile +} diff --git a/build/android/buildbot_try_compile_test.sh b/build/android/buildbot_try_compile_test.sh index e48ed1b..58a7919 100755 --- a/build/android/buildbot_try_compile_test.sh +++ b/build/android/buildbot_try_compile_test.sh @@ -16,4 +16,5 @@ bb_baseline_setup "${ROOT}"/../.. bb_install_build_deps "${ROOT}"/../.. bb_compile bb_run_tests -bb_native_test_compile_run_tests +bb_compile_apk_tests +bb_run_apk_tests diff --git a/build/android/run_tests.py b/build/android/run_tests.py index 6f59cb2..f059a24 100755 --- a/build/android/run_tests.py +++ b/build/android/run_tests.py @@ -76,6 +76,13 @@ _TEST_SUITES = ['base_unittests', 'ui_unittests', ] +# Test suites which are build as an APK. This will be replaced by the default +# list when we start building all suites as APK. +_APK_TEST_SUITES = ['replaceme', # Test the template apk too. + 'base_unittests', + 'ipc_tests', + 'ui_unittests', + ] def FullyQualifiedTestSuites(apk): """Return a fully qualified list that represents all known suites. @@ -86,11 +93,11 @@ def FullyQualifiedTestSuites(apk): test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR, 'out', 'Release')) if apk: - # out/Release/$SUITE_apk/ChromeNativeTests-debug.apk + # out/Release/$SUITE_apk/$SUITE-debug.apk suites = [os.path.join(test_suite_dir, t + '_apk', - 'ChromeNativeTests-debug.apk') - for t in _TEST_SUITES] + t + '-debug.apk') + for t in _APK_TEST_SUITES] else: suites = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES] return suites |