diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-15 01:35:49 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-15 01:35:49 +0000 |
commit | 4f577d2ed651bcee99a28acf666ce49a36751dc1 (patch) | |
tree | 21a9ee348647b80abe7ebee89c8a1f82fe66d7b3 /tools/perf | |
parent | f1050434d223c0a6ceabf9802106a0cedce7796b (diff) | |
download | chromium_src-4f577d2ed651bcee99a28acf666ce49a36751dc1.zip chromium_src-4f577d2ed651bcee99a28acf666ce49a36751dc1.tar.gz chromium_src-4f577d2ed651bcee99a28acf666ce49a36751dc1.tar.bz2 |
Add support to throughput_tests for better automated testing.
- support for parsing a test URL from a json file.
- support for overriding spinup and run times from json.
- support for triggering playback mode when cache dir is in json.
- support for waiting for a given pixel to change color before starting the test.
BUG=113679
Review URL: https://chromiumcodereview.appspot.com/9380017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/test-throughput.bat | 26 | ||||
-rwxr-xr-x | tools/perf/test-throughput.sh | 28 |
2 files changed, 54 insertions, 0 deletions
diff --git a/tools/perf/test-throughput.bat b/tools/perf/test-throughput.bat new file mode 100644 index 0000000..6722cb3 --- /dev/null +++ b/tools/perf/test-throughput.bat @@ -0,0 +1,26 @@ +@echo off
+:: Copyright (c) 2012 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.
+
+if [%1]==[] (
+ echo 'usage: test-throughput path\to\tests.json [0..n test_index]'
+ echo ' run in the same directory as performance_browser_tests'
+ exit /b 1
+)
+
+for /f "tokens=3" %%i in ('find /c """url"":" %1') do set num_tests=%%i
+set /a num_tests-=1
+set filter=*ThroughputTest*TestURL
+
+set args1=--gtest_filter=%filter% --gtest_also_run_disabled_tests
+set args2=--window-size=1400,1100 --window-position=0,0 --enable-gpu
+
+if [%2]==[] (
+ for /L %%G in (0,1,%num_tests%) do (
+ performance_browser_tests.exe %args1% %args2% --extra-chrome-flags=%1:%%G
+ )
+) else (
+ performance_browser_tests.exe %args1% %args2% --extra-chrome-flags=%1:%2
+)
+
diff --git a/tools/perf/test-throughput.sh b/tools/perf/test-throughput.sh new file mode 100755 index 0000000..d58a4e9 --- /dev/null +++ b/tools/perf/test-throughput.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +if [ -z "$1" ] +then + echo 'usage: test-throughput path/to/tests.json [0..n test_index]' + echo ' run in the same directory as performance_browser_tests' + exit -1 +fi + +num_tests=$(grep -o '\"url\"' $1 | wc -l) +filter='*ThroughputTest*TestURL' + +args1='--gtest_filter='$filter' --gtest_also_run_disabled_tests' +args2='--window-size=1400,1100 --window-position=0,0 --enable-gpu' + +if [ -z "$2" ] +then + for (( i=0; i<$num_tests; i++ )) + do + ./performance_browser_tests $args1 $args2 --extra-chrome-flags=$1:$i + done +else + ./performance_browser_tests $args1 $args2 --extra-chrome-flags=$1:$2 +fi + |