forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DanielWagnerHall: Crazy-fun-ifying python build
r15111
- Loading branch information
1 parent
7610cd5
commit 49206d8
Showing
99 changed files
with
346 additions
and
3,340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# py_test targets implicitly get the following extra targets added: | ||
# for each browser in browsers: | ||
# :name_B to gather the sources of the tests for browser B | ||
# :name_B:run to run the tests for browser B | ||
# Also, if only one browser, B, is listed in browsers: | ||
# :name:run is created as a synonym for :name_B:run | ||
# | ||
# Currently, pulling in other tests through deps is limited to deps declared in the same build.desc file | ||
|
||
py_test( | ||
name = "firefox_test", | ||
ff_specific_tests = [ "test/selenium/webdriver/firefox/*_tests.py" ], | ||
deps = [ ":test_ff" ], | ||
resources = [ | ||
{ "//javascript/firefox-driver:webdriver" : "lib/selenium/webdriver/firefox" } | ||
], | ||
browsers = [ "ff" ]) | ||
|
||
py_test( | ||
name = "ie_test", | ||
deps = [ ":test_ie" ], | ||
resources = [ | ||
{"//cpp:ie_win32_dll" : "lib\\selenium\\webdriver\\ie\\win32\\IEDriver.dll"}, | ||
{"//cpp:ie_x64_dll" : "lib\\selenium\\webdriver\\ie\\x64\\IEDriver.dll"} | ||
], | ||
|
||
browsers = [ "ie" ]) | ||
|
||
py_test( | ||
name = "remote_firefox_test", | ||
remote_firefox_specific_tests = [ "test/selenium/webdriver/remote/*_tests.py" ], | ||
deps = [ ":test_remote" ], | ||
browsers = [ "remote_firefox" ]) | ||
|
||
py_env( | ||
name = "test_env", | ||
packages = [ | ||
"third_party/py/simplejson-2.2.1.tar.gz", | ||
"third_party/py/py-1.4.5.zip", | ||
"third_party/py/pytest-2.0.3.zip", | ||
" third_party/py/rdflib-3.1.0.tar.gz" | ||
], | ||
dest = "build/python") | ||
|
||
py_test( | ||
name = "test", | ||
common_tests = [ | ||
"test/selenium/webdriver/common/*_tests.py", | ||
"test/selenium/webdriver/support/*_tests.py" | ||
], | ||
browsers = [ | ||
"chrome", | ||
"ff", | ||
"ie", | ||
"remote_firefox" | ||
]) |
87 changes: 44 additions & 43 deletions
87
...enium/webdriver/remote/test_remote_api.py → ...um/webdriver/browser_specific_template.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2008-2009 WebDriver committers | ||
# Copyright 2008-2009 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
from selenium.test.selenium.webdriver.common.webserver import SimpleWebServer | ||
from selenium.test.selenium.webdriver.common import api_examples | ||
from selenium.test.selenium.common import utils | ||
from selenium import webdriver | ||
|
||
|
||
def setup_module(module): | ||
utils.start_server(module) | ||
webserver = SimpleWebServer() | ||
webserver.start() | ||
RemoteApiExampleTest.webserver = webserver | ||
RemoteApiExampleTest.driver = webdriver.Remote(desired_capabilities=webdriver.DesiredCapabilities.FIREFOX) | ||
|
||
|
||
class RemoteApiExampleTest(api_examples.ApiExampleTest): | ||
pass | ||
|
||
|
||
def teardown_module(module): | ||
try: | ||
RemoteApiExampleTest.driver.quit() | ||
except AttributeError: | ||
pass | ||
try: | ||
RemoteApiExampleTest.webserver.stop() | ||
except AttributeError: | ||
pass | ||
utils.stop_server(module) | ||
#!/usr/bin/python | ||
# | ||
# Copyright 2011 Software Freedom Conservancy | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
##CUSTOM_TEST_IMPORT## | ||
from selenium import webdriver | ||
from selenium.##PACKAGE_NAME## import ##GENERAL_FILENAME## | ||
from selenium.test.selenium.webdriver.common.webserver import SimpleWebServer | ||
|
||
def setup_module(module): | ||
##CUSTOM_TEST_SETUP## | ||
webserver = SimpleWebServer() | ||
webserver.start() | ||
##BROWSER_SPECIFIC_TEST_CLASS##.webserver = webserver | ||
##BROWSER_SPECIFIC_TEST_CLASS##.driver = webdriver.##BROWSER_CONSTRUCTOR## | ||
|
||
|
||
class ##BROWSER_SPECIFIC_TEST_CLASS##(##GENERAL_FILENAME##.##GENERAL_TEST_CLASS##): | ||
pass | ||
|
||
|
||
def teardown_module(module): | ||
try: | ||
##BROWSER_SPECIFIC_TEST_CLASS##.driver.quit() | ||
except AttributeError: | ||
pass | ||
try: | ||
##BROWSER_SPECIFIC_TEST_CLASS##.webserver.stop() | ||
except AttributeError: | ||
pass | ||
##CUSTOM_TEST_TEARDOWN## |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.