| OLD | NEW |
| (Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 # How to use: |
| 8 # |
| 9 # 1. For the tests to run an appropriate version of webview |
| 10 # needs to be installed on the device (e.g. system_webview_apk). |
| 11 # 2. Build system_webview_shell_layout_test_apk. This will also |
| 12 # create a base script for running tests used here. |
| 13 # 3. Execute run_test_rebaseline.sh [builddir] |
| 14 # "builddir" is the build output directory (e.g. out/Debug/ |
| 15 # which is also the default if no directory is provided). |
| 16 # This script will produce a shadow test_rebaseline/ directory |
| 17 # with the new rebased expectation files. |
| 18 # It is recommended to run this script from it's local |
| 19 # directory in order to have the rebaseline files placed |
| 20 # at the same level as the original test files. |
| 21 # |
| 22 # Note: to simply run the tests without the rebaseline |
| 23 # use the bin/run_system_webview_shell_layout_test_apk script |
| 24 # located in the build output directory. |
| 25 # |
| 26 |
| 27 if [ "$1" == "" ]; then |
| 28 # use the default |
| 29 SCRIPT_BUILD_DIR="../../../../../out/Debug/" |
| 30 else |
| 31 SCRIPT_BUILD_DIR="$1" |
| 32 fi |
| 33 |
| 34 PACKAGE_NAME="org.chromium.webview_shell.test" |
| 35 DEVICE_WEBVIEW_TEST_PATH="/sdcard/chromium_tests_root/android_webview/tools/" |
| 36 DEVICE_WEBVIEW_TEST_PATH+="system_webview_shell/test/data/" |
| 37 RUNNER=$SCRIPT_BUILD_DIR"bin/run_system_webview_shell_layout_test_apk" |
| 38 |
| 39 echo $SCRIPT_BUILD_DIR |
| 40 |
| 41 $RUNNER |
| 42 |
| 43 adb shell am instrument -w -e mode rebaseline -e class \ |
| 44 $PACKAGE_NAME.WebViewLayoutTest \ |
| 45 $PACKAGE_NAME/$PACKAGE_NAME.WebViewLayoutTestRunner |
| 46 adb pull $DEVICE_WEBVIEW_TEST_PATH ../test_rebaseline/ |
| 47 |
| 48 exit 0 |
| OLD | NEW |