Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: android_webview/tools/system_webview_shell/test/data/run_tests.sh

Issue 2659843003: [WebView] Fix the run_tests.sh script and add documentation. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright 2015 The Chromium Authors. All rights reserved. 3 # Copyright 2015 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # How to use:
8 #
9 # 1. Build system_webview_shell_apk system_webview_apk (or
10 # system_webview_google_apk for non AOSP devices) and
11 # system_webview_shell_layout_test_apk.
12 # 2. Install the shell and system_webview on the device
13 # (e.g. adb install -r -d out/Debug/apks/SystemWebView.apk)
14 # and make sure it is enabled.
Torne 2017/01/30 14:27:22 Isn't the intention of the autogenerated scripts t
timvolodine 2017/02/04 02:42:22 right, this is a bit elaborate I'll double-check w
15 # 3. Update the build output directory SCRIPT_BUILD_DIR below
16 # if different.
17 # 3. Execute run_test.sh [rebaseline]
18 # Simply running this script is equivalent to running the
19 # tests in WebViewLayoutTest. With the [rebaseline] argument
20 # the script will produce a shadow test_rebaseline/ directory
21 # with the new rebased expectation files.
22 #
23
24 # if necessary update this to reflect the output build directory.
25 SCRIPT_BUILD_DIR="../../../../../out/Debug/"
Torne 2017/01/30 14:27:22 I don't think it's reasonable to hardcode this out
timvolodine 2017/02/04 02:42:22 good point, so maybe just have a parameter (with o
26
7 PACKAGE_NAME="org.chromium.webview_shell.test" 27 PACKAGE_NAME="org.chromium.webview_shell.test"
8 DEVICE_WEBVIEW_TEST_PATH="/sdcard/chromium_tests_root/android_webview/tools/" 28 DEVICE_WEBVIEW_TEST_PATH="/sdcard/chromium_tests_root/android_webview/tools/"
9 DEVICE_WEBVIEW_TEST_PATH+="system_webview_shell/test/data/" 29 DEVICE_WEBVIEW_TEST_PATH+="system_webview_shell/test/data/"
10 TESTRUNNER="../../../../build/android/test_runner.py" 30 RUNNER=$SCRIPT_BUILD_DIR"bin/run_system_webview_shell_layout_test_apk"
11 31
12 $TESTRUNNER instrumentation \ 32 $RUNNER
13 --test-apk SystemWebViewShellLayoutTest \
14 -f 'WebViewLayoutTest*' \
15 --isolate-file-path android_webview/system_webview_shell_test_apk.isolate
16 33
17 if [ "$1" = "rebaseline" ]; then 34 if [ "$1" = "rebaseline" ]; then
18 adb shell am instrument -w -e mode rebaseline -e class \ 35 adb shell am instrument -w -e mode rebaseline -e class \
19 $PACKAGE_NAME.WebViewLayoutTest \ 36 $PACKAGE_NAME.WebViewLayoutTest \
20 $PACKAGE_NAME/$PACKAGE_NAME.WebViewLayoutTestRunner 37 $PACKAGE_NAME/$PACKAGE_NAME.WebViewLayoutTestRunner
21 adb pull $DEVICE_WEBVIEW_TEST_PATH ../test_rebaseline/ 38 adb pull $DEVICE_WEBVIEW_TEST_PATH ../test_rebaseline/
22 fi 39 fi
23 40
24 exit 0 41 exit 0
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698