| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Base class for linker-specific test cases. | 5 """Base class for linker-specific test cases. |
| 6 | 6 |
| 7 The custom dynamic linker can only be tested through a custom test case | 7 The custom dynamic linker can only be tested through a custom test case |
| 8 for various technical reasons: | 8 for various technical reasons: |
| 9 | 9 |
| 10 - It's an 'invisible feature', i.e. it doesn't expose a new API or | 10 - It's an 'invisible feature', i.e. it doesn't expose a new API or |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 To build and run the linker tests, do the following: | 30 To build and run the linker tests, do the following: |
| 31 | 31 |
| 32 ninja -C out/Debug chromium_linker_test_apk | 32 ninja -C out/Debug chromium_linker_test_apk |
| 33 build/android/test_runner.py linker | 33 build/android/test_runner.py linker |
| 34 | 34 |
| 35 """ | 35 """ |
| 36 # pylint: disable=R0201 | 36 # pylint: disable=R0201 |
| 37 | 37 |
| 38 import logging | 38 import logging |
| 39 import os | |
| 40 import re | 39 import re |
| 41 import time | |
| 42 | 40 |
| 43 from devil.android import device_errors | 41 from devil.android import device_errors |
| 44 from devil.android.sdk import intent | 42 from devil.android.sdk import intent |
| 45 from pylib import constants | |
| 46 from pylib.base import base_test_result | 43 from pylib.base import base_test_result |
| 47 | 44 |
| 48 | 45 |
| 49 ResultType = base_test_result.ResultType | 46 ResultType = base_test_result.ResultType |
| 50 | 47 |
| 51 _PACKAGE_NAME = 'org.chromium.chromium_linker_test_apk' | 48 _PACKAGE_NAME = 'org.chromium.chromium_linker_test_apk' |
| 52 _ACTIVITY_NAME = '.ChromiumLinkerTestActivity' | 49 _ACTIVITY_NAME = '.ChromiumLinkerTestActivity' |
| 53 _COMMAND_LINE_FILE = '/data/local/tmp/chromium-linker-test-command-line' | 50 _COMMAND_LINE_FILE = '/data/local/tmp/chromium-linker-test-command-line' |
| 54 | 51 |
| 55 # Logcat filters used during each test. Only the 'chromium' one is really | 52 # Logcat filters used during each test. Only the 'chromium' one is really |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 218 |
| 222 Note that there can be other lines beginning with BROWSER_LINKER_TEST: | 219 Note that there can be other lines beginning with BROWSER_LINKER_TEST: |
| 223 and RENDERER_LINKER_TEST:, but are not followed by a <status> code. | 220 and RENDERER_LINKER_TEST:, but are not followed by a <status> code. |
| 224 | 221 |
| 225 - The test case passes if the <status> for both the browser and renderer | 222 - The test case passes if the <status> for both the browser and renderer |
| 226 process are SUCCESS. Otherwise its a fail. | 223 process are SUCCESS. Otherwise its a fail. |
| 227 """ | 224 """ |
| 228 def _RunTest(self, device): | 225 def _RunTest(self, device): |
| 229 # Wait up to 30 seconds until the linker test status is in the logcat. | 226 # Wait up to 30 seconds until the linker test status is in the logcat. |
| 230 return _StartActivityAndWaitForLinkerTestStatus(device, timeout=30) | 227 return _StartActivityAndWaitForLinkerTestStatus(device, timeout=30) |
| OLD | NEW |