Run base_unittests_apk on the test try bot for realz.

This will make the android_test bot red when apk tests fail.

The ANDROID_APK_TEST_TARGET flag is required while we transition from executable to APK tests.
 - Executable tests need the DIR_CACHE override as the default path comes from the java side.

BUG=125059

Review URL: https://chromiumcodereview.appspot.com/10332230

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138407 0039d316-1c4b-4281-b951-d872f2087c98
parent fdc9d6c5
...@@ -137,10 +137,14 @@ bool PathTestProviderAndroid(int key, FilePath* result) { ...@@ -137,10 +137,14 @@ bool PathTestProviderAndroid(int key, FilePath* result) {
*result = FilePath(kAndroidTestTempDirectory); *result = FilePath(kAndroidTestTempDirectory);
return true; return true;
} }
#if !defined(ANDROID_APK_TEST_TARGET)
// When running as executable we need to use /data/local/tmp as the
// cache directory.
case base::DIR_CACHE: { case base::DIR_CACHE: {
*result = FilePath(kAndroidTestTempDirectory); *result = FilePath(kAndroidTestTempDirectory);
return true; return true;
} }
#endif // !defined(ANDROID_APK_TEST_TARGET)
case base::DIR_ANDROID_APP_DATA: { case base::DIR_ANDROID_APP_DATA: {
*result = FilePath(kAndroidTestTempDirectory); *result = FilePath(kAndroidTestTempDirectory);
return true; return true;
......
...@@ -232,13 +232,5 @@ function bb_run_tests { ...@@ -232,13 +232,5 @@ function bb_run_tests {
# Run APK tests on an actual device. # Run APK tests on an actual device.
function bb_run_apk_tests { function bb_run_apk_tests {
echo "@@@BUILD_STEP Run APK Tests on actual hardware@@@" echo "@@@BUILD_STEP Run APK Tests on actual hardware@@@"
tempfile=/tmp/tempfile-$$.txt build/android/run_tests.py --xvfb --verbose --apk=True
# 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
} }
# List of suppressions # List of suppressions
# #
# Sometimes this is automatically generated by run_tests.py # Sometimes this is automatically generated by run_tests.py
RTLTest.GetTextDirection
ReadOnlyFileUtilTest.ContentsEqual ReadOnlyFileUtilTest.ContentsEqual
ReadOnlyFileUtilTest.TextContentsEqual ReadOnlyFileUtilTest.TextContentsEqual
SharedMemoryTest.OpenExclusive SharedMemoryTest.OpenExclusive
StackTrace.DebugPrintBacktrace
VerifyPathControlledByUserTest.Symlinks VerifyPathControlledByUserTest.Symlinks
PathServiceTest.Get
SharedMemoryTest.OpenClose SharedMemoryTest.OpenClose
StringPrintfTest.StringPrintfMisc StringPrintfTest.StringPrintfMisc
StringPrintfTest.StringAppendfString StringPrintfTest.StringAppendfString
...@@ -19,3 +16,7 @@ FieldTrialTest.* ...@@ -19,3 +16,7 @@ FieldTrialTest.*
StackContainer.BufferAlignment StackContainer.BufferAlignment
# Failed on bot since it was first introduced. # Failed on bot since it was first introduced.
FileUtilProxyTest.Touch FileUtilProxyTest.Touch
# New failures on APK
MessagePumpLibeventTest.DeleteWatcher
MessagePumpLibeventTest.StopWatcher
SharedMemoryProcessTest.Tasks
...@@ -76,12 +76,9 @@ _TEST_SUITES = ['base_unittests', ...@@ -76,12 +76,9 @@ _TEST_SUITES = ['base_unittests',
'ui_unittests', 'ui_unittests',
] ]
# Test suites which are build as an APK. This will be replaced by the default # Test suites which are run as APK. This will be replaced by the default
# list when we start building all suites as APK. # list when we start building all suites as APK.
_APK_TEST_SUITES = ['replaceme', # Test the template apk too. _APK_TEST_SUITES = ['base_unittests',
'base_unittests',
'ipc_tests',
'ui_unittests',
] ]
def FullyQualifiedTestSuites(apk): def FullyQualifiedTestSuites(apk):
......
...@@ -901,7 +901,7 @@ ...@@ -901,7 +901,7 @@
'notifications%': 0, 'notifications%': 0,
'gtest_target_type%': '<(gtest_target_type)', 'gtest_target_type%': '<(gtest_target_type)',
# TODO(jrg): when 'gtest_target_type'=='shared_libary' and # TODO(jrg): when 'gtest_target_type'=='shared_library' and
# OS==android, make all gtest_targets depend on # OS==android, make all gtest_targets depend on
# testing/android/native_test.gyp:native_test_apk. # testing/android/native_test.gyp:native_test_apk.
### 'gtest_target_type': 'shared_libary', ### 'gtest_target_type': 'shared_libary',
...@@ -1349,6 +1349,9 @@ ...@@ -1349,6 +1349,9 @@
['enable_metro==1', { ['enable_metro==1', {
'defines': ['ENABLE_METRO=1'], 'defines': ['ENABLE_METRO=1'],
}], }],
['OS=="android" and gtest_target_type=="shared_library"', {
'defines': ['ANDROID_APK_TEST_TARGET=1'],
}],
['fastbuild!=0', { ['fastbuild!=0', {
'conditions': [ 'conditions': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment