diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-17 08:35:26 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-17 08:35:26 +0000 |
commit | 2bf23d13a9496f9286c9f9b54ab6f6dd62dc2992 (patch) | |
tree | 944f011a16ef40ae75829af4341c0bb27d3cc038 /tools/gypv8sh.py | |
parent | 5e3127da1dec04d0c1345bb025dab06ebd8daeee (diff) | |
download | chromium_src-2bf23d13a9496f9286c9f9b54ab6f6dd62dc2992.zip chromium_src-2bf23d13a9496f9286c9f9b54ab6f6dd62dc2992.tar.gz chromium_src-2bf23d13a9496f9286c9f9b54ab6f6dd62dc2992.tar.bz2 |
Revert 89453 - Support automatic javascript test registry in gtest when creating WebUI tests.
- gypv8sh.py is breaking on Mac
http://build.chromium.org/p/chromium/builders/Mac10.5%20Tests%20%281%29/builds/8563/steps/update/logs/stdio
File "/b/build/slave/Mac10_5_Tests__1_/build/src/tools/gyp/pylib/gyp/input.py", line 1017, in ProcessVariablesAndConditionsInList
expanded = ExpandVariables(item, is_late, variables, build_file)
File "/b/build/slave/Mac10_5_Tests__1_/build/src/tools/gyp/pylib/gyp/input.py", line 684, in ExpandVariables
(contents, p.returncode))
Exception: Call to 'python ../tools/gypv8sh.py -i' returned exit status 1. while loading dependencies of src/chrome/browser/sync/tools/sync_tools.gyp while loading dependencies of src/build/all.gyp while trying to load src/build/all.gyp
Error: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python src/build/gyp_chromium in /b/build/slave/Mac10_5_Tests__1_/build returned 1
The goal was to support something as simple as the following, where the tests in the
javascript files would be 1st class GTESTs, supporting FLAKY_, DISABLED_, etc, and
registered at linker_initialization time.
WEB_UI_BROWSER_TEST_JS(WebUIBrowserTest, TestJSPass,
FILE_PATH_LITERAL("sample_passing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
WEB_UI_BROWSER_TEST_JS_FALSE(WebUIBrowserTest, TestJSFail,
FILE_PATH_LITERAL("sample_failing.js")) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL));
}
http://www.chromium.org/Home/domui-testing
In order to support linker init time, I had to modify path_service to support
Unregistration, and chrome_paths to allow multiple invocations.
BUG=82437
R=estade@chromium.org,jhawkins@chromium.org
TEST=browser_tests --gtest_filter=WebUIBrowserTest*
Review URL: http://codereview.chromium.org/7087014
TBR=scr@chromium.org
Review URL: http://codereview.chromium.org/7193030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gypv8sh.py')
-rwxr-xr-x | tools/gypv8sh.py | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/tools/gypv8sh.py b/tools/gypv8sh.py deleted file mode 100755 index 387b9e4..0000000 --- a/tools/gypv8sh.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/python -# Copyright (c) 2011 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. -# -# This script is used by chrome_tests.gypi's js2webui action to maintain the -# argument lists and to generate inlinable tests. -# -# Usage: -# python tools/gypv8sh.py -p product_dir path/to/javascript2webui.js -# python tools/gypv8sh.py -t # print test_harnesses -# python tools/gypv8sh.py -i # print inputs -# python tools/gypv8sh.py -o # print outputs -import json -import optparse -import os -import subprocess -import sys - -# Please adjust the following to edit or add new javascript webui tests. -rules = [ - [ - 'WebUIBrowserTestPass', - 'test/data/webui/sample_pass.js', - 'browser/ui/webui/web_ui_browsertest-inl.h', - ], - ] - -def set_add(option, opt_str, value, parser, the_set, the_value): - the_set.add(the_value) - -# For options -t, -i, & -o, we print the "column" of the |rules|. We keep a set -# of indices to print in |print_rule_indices| and print them in sorted order if -# non-empty. -print_rule_indices = set() -parser = optparse.OptionParser(); -parser.set_usage( - "%prog [-v][-n] --product_dir PRODUCT_DIR -or- " - "%prog [-v][-n] (-i|-t|-o)"); -parser.add_option('-v', '--verbose', action='store_true', dest='verbose') -parser.add_option('-n', '--impotent', action='store_true', dest='impotent', - help="don't execute; just print (as if verbose)") -parser.add_option('-p', '--product_dir', action='store', type='string', - dest='product_dir', - help='for gyp to set the <(PRODUCT_DIR) for running v8_shell') -parser.add_option('-t', '--test_fixture', action='callback', callback=set_add, - callback_args=tuple([print_rule_indices, 0]), - help='print test_fixtures') -parser.add_option('-i', '--in', action='callback', callback=set_add, - callback_args=tuple([print_rule_indices, 1]), - help='print inputs') -parser.add_option('-o', '--out', action='callback', callback=set_add, - callback_args=tuple([print_rule_indices, 2]), - help='print outputs') -(opts, args) = parser.parse_args(); - -if len(print_rule_indices): - for rule in rules: - for index in sorted(print_rule_indices): - print rule[index], - print -else: - if not opts.product_dir: - parser.error("--product_dir option is required"); - v8_shell = os.path.join(opts.product_dir, 'v8_shell') - jsfilename = args[0] - for rule in rules: - arguments = [jsfilename, rule[0], rule[1], os.path.basename(rule[1])] - arguments = "arguments=" + json.dumps(arguments) - cmd = [v8_shell, '-e', arguments, jsfilename] - if opts.verbose or opts.impotent: - print cmd - if not opts.impotent: - sys.exit(subprocess.call(cmd, stdout=open(rule[2],'w+'))) |