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

Unified Diff: android_webview/tools/system_webview_shell/test/data/run_tests_rebaseline.sh

Issue 2659843003: [WebView] Fix the run_tests.sh script and add documentation. (Closed)
Patch Set: update documentation and copyright 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/tools/system_webview_shell/test/data/run_tests.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/tools/system_webview_shell/test/data/run_tests_rebaseline.sh
diff --git a/android_webview/tools/system_webview_shell/test/data/run_tests_rebaseline.sh b/android_webview/tools/system_webview_shell/test/data/run_tests_rebaseline.sh
new file mode 100755
index 0000000000000000000000000000000000000000..74feb163b10225c40b74d8d67ff958ec3ef52e41
--- /dev/null
+++ b/android_webview/tools/system_webview_shell/test/data/run_tests_rebaseline.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# How to use:
+#
+# 1. For the tests to run an appropriate version of webview
+# needs to be installed on the device (e.g. system_webview_apk).
+# 2. Build system_webview_shell_layout_test_apk. This will also
+# create a base script for running tests used here.
+# 3. Execute run_test_rebaseline.sh [builddir]
+# "builddir" is the build output directory (e.g. out/Debug/
+# which is also the default if no directory is provided).
+# This script will produce a shadow test_rebaseline/ directory
+# with the new rebased expectation files.
+# It is recommended to run this script from it's local
+# directory in order to have the rebaseline files placed
+# at the same level as the original test files.
+#
+# Note: to simply run the tests without the rebaseline
+# use the bin/run_system_webview_shell_layout_test_apk script
+# located in the build output directory.
+#
+
+if [ "$1" == "" ]; then
+ # use the default
+ SCRIPT_BUILD_DIR="../../../../../out/Debug/"
+else
+ SCRIPT_BUILD_DIR="$1"
+fi
+
+PACKAGE_NAME="org.chromium.webview_shell.test"
+DEVICE_WEBVIEW_TEST_PATH="/sdcard/chromium_tests_root/android_webview/tools/"
+DEVICE_WEBVIEW_TEST_PATH+="system_webview_shell/test/data/"
+RUNNER=$SCRIPT_BUILD_DIR"bin/run_system_webview_shell_layout_test_apk"
+
+echo $SCRIPT_BUILD_DIR
+
+$RUNNER
+
+adb shell am instrument -w -e mode rebaseline -e class \
+ $PACKAGE_NAME.WebViewLayoutTest \
+ $PACKAGE_NAME/$PACKAGE_NAME.WebViewLayoutTestRunner
+adb pull $DEVICE_WEBVIEW_TEST_PATH ../test_rebaseline/
+
+exit 0
« no previous file with comments | « android_webview/tools/system_webview_shell/test/data/run_tests.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698