-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java] More progress building with bazel
All of java/client/src should build with bazel. The java/client/test tree is a work in progress. Running tests is the current bottleneck as anything that tries to start a browser crashes due to the bazel sandbox: My latest results for `bazel test java/client/test/...`: //java/client/test/org/openqa/selenium/atoms:CompiledAtomsNotLeakingTest (cached) PASSED in 0.3s //java/client/test/org/openqa/selenium/atoms:InputAtomsTest (cached) PASSED in 0.4s //java/client/test/org/openqa/selenium/io:CircularOutputStreamTest (cached) PASSED in 0.7s //java/client/test/org/openqa/selenium/io:FileHandlerTest (cached) PASSED in 0.7s //java/client/test/org/openqa/selenium/io:TemporaryFilesystemTest (cached) PASSED in 0.7s //java/client/test/org/openqa/selenium/io:ZipTest (cached) PASSED in 0.7s //java/client/test/org/openqa/selenium/net:LinuxEphemeralPortRangeDetectorTest (cached) PASSED in 0.4s //java/client/test/org/openqa/selenium/net:NetworkUtilsTest (cached) PASSED in 0.4s //java/client/test/org/openqa/selenium/net:UrlCheckerTest (cached) PASSED in 1.1s //java/client/test/org/openqa/selenium/os:CommandLineTest (cached) PASSED in 3.0s //java/client/test/org/openqa/selenium/support:small-tests (cached) PASSED in 2.5s //java/client/test/org/openqa/selenium/testing:IgnoreComparatorUnitTest (cached) PASSED in 0.7s //java/client/test/org/openqa/selenium/support:large-tests FAILED in 12.2s
- Loading branch information
Showing
40 changed files
with
914 additions
and
81 deletions.
There are no files selected for viewing
Empty file.
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,11 @@ | ||
def copy_file(name, src, out = None, **kwargs): | ||
if out == None: | ||
out = src | ||
|
||
native.genrule( | ||
name = name, | ||
srcs = [src], | ||
outs = [out], | ||
cmd = "cp $< $@", | ||
**kwargs | ||
) |
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,21 @@ | ||
load("//:copy_file.bzl", "copy_file") | ||
|
||
copy_file( | ||
name = "noblur32", | ||
out = "i386/x_ignore_nofocus.so", | ||
src = "i386/libnoblur.so", | ||
visibility = [ | ||
"//dotnet/src/webdriver:__pkg__", | ||
"//java/client/src/org/openqa/selenium/firefox/xpi:__pkg__", | ||
], | ||
) | ||
|
||
copy_file( | ||
name = "noblur64", | ||
out = "amd64/x_ignore_nofocus.so", | ||
src = "amd64/libnoblur64.so", | ||
visibility = [ | ||
"//dotnet/src/webdriver:__pkg__", | ||
"//java/client/src/org/openqa/selenium/firefox/xpi:__pkg__", | ||
], | ||
) |
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,58 @@ | ||
java_library( | ||
name = "api", | ||
srcs = [ | ||
"CommandProcessor.java", | ||
"Selenium.java", | ||
"SeleniumException.java", | ||
"Wait.java", | ||
], | ||
visibility = [ | ||
"//java/client/src/com/thoughtworks/selenium/condition:__pkg__", | ||
], | ||
) | ||
|
||
java_library( | ||
name = "selenium", | ||
srcs = [ | ||
"BrowserConfigurationOptions.java", | ||
"DefaultRemoteCommand.java", | ||
"DefaultSelenium.java", | ||
"HttpCommandProcessor.java", | ||
"RemoteCommand.java", | ||
"ScreenshotListener.java", | ||
"SeleneseTestBase.java", | ||
"SeleneseTestCase.java", | ||
"SeleneseTestNgHelper.java", | ||
"SeleniumLogLevels.java", | ||
], | ||
visibility = [ | ||
"//java/client/src/com/thoughtworks/selenium:__subpackages__", | ||
"//java/client/test/com/thoughtworks/selenium:__subpackages__", | ||
"//java/server/src/com/thoughtworks/selenium:__pkg__", | ||
], | ||
exports = [ | ||
":api", | ||
], | ||
deps = [ | ||
":api", | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/edge", | ||
"//java/client/src/org/openqa/selenium/net", | ||
"//third_party/java/guava", | ||
"//third_party/java/junit", | ||
"//third_party/java/testng", | ||
], | ||
) | ||
|
||
java_library( | ||
name = "leg-rc", | ||
visibility = [ | ||
"//visibility:public", | ||
], | ||
exports = [ | ||
":api", | ||
":selenium", | ||
"//java/client/src/com/thoughtworks/selenium/condition", | ||
"//java/client/src/com/thoughtworks/selenium/webdriven", | ||
], | ||
) |
11 changes: 11 additions & 0 deletions
11
java/client/src/com/thoughtworks/selenium/condition/BUILD.bazel
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,11 @@ | ||
java_library( | ||
name = "condition", | ||
srcs = glob(["*.java"]), | ||
visibility = [ | ||
"//java/client/src/com/thoughtworks/selenium:__pkg__", | ||
], | ||
deps = [ | ||
"//java/client/src/com/thoughtworks/selenium:api", | ||
"//third_party/java/junit", | ||
], | ||
) |
105 changes: 104 additions & 1 deletion
105
java/client/src/com/thoughtworks/selenium/webdriven/BUILD.bazel
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 +1,104 @@ | ||
exports_files(["htmlutils.js", "injectableSelenium.js"]) | ||
load("//:copy_file.bzl", "copy_file") | ||
|
||
exports_files([ | ||
"htmlutils.js", | ||
"injectableSelenium.js", | ||
]) | ||
|
||
java_library( | ||
name = "webdriven", | ||
srcs = [ | ||
"CompoundMutator.java", | ||
"ExplodingSupplier.java", | ||
"FunctionDeclaration.java", | ||
"SeleniumMutator.java", | ||
"VariableDeclaration.java", | ||
"WebDriverBackedSelenium.java", | ||
"WebDriverCommandProcessor.java", | ||
], | ||
resources = [ | ||
"htmlutils.js", | ||
"injectableSelenium.js", | ||
":findElement", | ||
":findOption", | ||
":fireEvent", | ||
":fireEventAt", | ||
":getAttribute", | ||
":getText", | ||
":linkLocator", | ||
":isElementPresent", | ||
":isSomethingSelected", | ||
":isTextPresent", | ||
":isVisible", | ||
":setCursorPosition", | ||
":type", | ||
# TODO(simons): remove sizzle. There are no longer any browsers that need it. | ||
":sizzle", | ||
], | ||
visibility = [ | ||
"//java/client/src/com/thoughtworks/selenium:__subpackages__", | ||
"//java/client/test/com/thoughtworks/selenium:__subpackages__", | ||
"//java/server/src/com/thoughtworks/selenium/webdriven:__pkg__", | ||
"//java/server/src/org/openqa/grid/selenium:__pkg__", | ||
"//java/server/src/org/openqa/selenium/server/htmlrunner:__pkg__", | ||
], | ||
exports = [ | ||
":emulation-api", | ||
"//java/client/src/com/thoughtworks/selenium/webdriven/commands", | ||
], | ||
deps = [ | ||
":emulation-api", | ||
"//java/client/src/com/thoughtworks/selenium", | ||
"//java/client/src/com/thoughtworks/selenium/webdriven/commands", | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/remote", | ||
"//third_party/java/guava", | ||
], | ||
) | ||
|
||
java_library( | ||
name = "emulation-api", | ||
srcs = [ | ||
"ElementFinder.java", | ||
"JavascriptLibrary.java", | ||
"ScriptMutator.java", | ||
"SeleneseCommand.java", | ||
"Timer.java", | ||
"Windows.java", | ||
], | ||
visibility = [ | ||
"//java/client/src/com/thoughtworks/selenium:__subpackages__", | ||
"//java/client/test/com/thoughtworks/selenium:__subpackages__", | ||
], | ||
deps = [ | ||
"//java/client/src/com/thoughtworks/selenium", | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//third_party/java/guava", | ||
], | ||
) | ||
|
||
[copy_file( | ||
name = name, | ||
src = "//javascript/selenium-atoms:%s.js" % name, | ||
out = "%s.js" % name, | ||
) for name in [ | ||
"findElement", | ||
"findOption", | ||
"fireEvent", | ||
"fireEventAt", | ||
"getAttribute", | ||
"getText", | ||
"linkLocator", | ||
"isElementPresent", | ||
"isSomethingSelected", | ||
"isTextPresent", | ||
"isVisible", | ||
"setCursorPosition", | ||
"type", | ||
]] | ||
|
||
copy_file( | ||
name = "sizzle", | ||
src = "//third_party/js/sizzle", | ||
out = "sizzle.js", | ||
) |
14 changes: 14 additions & 0 deletions
14
java/client/src/com/thoughtworks/selenium/webdriven/commands/BUILD.bazel
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,14 @@ | ||
java_library( | ||
name = "commands", | ||
srcs = glob(["*.java"]), | ||
visibility = [ | ||
"//java/client/src/com/thoughtworks/selenium/webdriven:__pkg__", | ||
], | ||
deps = [ | ||
"//java/client/src/com/thoughtworks/selenium", | ||
"//java/client/src/com/thoughtworks/selenium/webdriven:emulation-api", | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/io", | ||
"//third_party/java/guava", | ||
], | ||
) |
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,14 @@ | ||
java_library( | ||
name = "chrome", | ||
srcs = glob(["*.java"]), | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/devtools", | ||
"//java/client/src/org/openqa/selenium/json", | ||
"//java/client/src/org/openqa/selenium/remote", | ||
"//java/client/src/org/openqa/selenium/remote/http", | ||
"//third_party/java/guava", | ||
"//third_party/java/service", | ||
], | ||
) |
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,11 @@ | ||
java_library( | ||
name = "edge", | ||
srcs = glob(["*.java"]), | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/remote", | ||
"//third_party/java/guava", | ||
"//third_party/java/service", | ||
], | ||
) |
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,25 @@ | ||
load("//:copy_file.bzl", "copy_file") | ||
|
||
java_library( | ||
name = "firefox", | ||
srcs = glob(["*.java"]), | ||
resources = [":prefs"], | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/io", | ||
"//java/client/src/org/openqa/selenium/json", | ||
"//java/client/src/org/openqa/selenium/net", | ||
"//java/client/src/org/openqa/selenium/os", | ||
"//java/client/src/org/openqa/selenium/remote", | ||
"//java/client/src/org/openqa/selenium/remote/http", | ||
"//third_party/java/guava", | ||
"//third_party/java/service", | ||
], | ||
) | ||
|
||
copy_file( | ||
name = "prefs", | ||
src = "//third_party/js/selenium:webdriver.json", | ||
out = "webdriver_prefs.json", | ||
) |
40 changes: 40 additions & 0 deletions
40
java/client/src/org/openqa/selenium/firefox/xpi/BUILD.bazel
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,40 @@ | ||
load("//:copy_file.bzl", "copy_file") | ||
|
||
java_library( | ||
name = "xpi", | ||
srcs = glob(["*.java"]), | ||
resources = [ | ||
":amd64", | ||
":i386", | ||
":webdriver_xpi", | ||
], | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/firefox", | ||
"//java/client/src/org/openqa/selenium/io", | ||
"//java/client/src/org/openqa/selenium/net", | ||
"//java/client/src/org/openqa/selenium/os", | ||
"//java/client/src/org/openqa/selenium/remote", | ||
"//third_party/java/guava", | ||
"//third_party/java/service", | ||
], | ||
) | ||
|
||
copy_file( | ||
name = "webdriver_xpi", | ||
src = "//third_party/js/selenium:webdriver_xpi", | ||
out = "webdriver.xpi", | ||
) | ||
|
||
copy_file( | ||
name = "i386", | ||
src = "//cpp/prebuilt:noblur32", | ||
out = "x86/x_ignore_nofocus.so", | ||
) | ||
|
||
copy_file( | ||
name = "amd64", | ||
src = "//cpp/prebuilt:noblur64", | ||
out = "amd64/x_ignore_nofocus.so", | ||
) |
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,11 @@ | ||
java_library( | ||
name = "ie", | ||
srcs = glob(["*.java"]), | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/remote", | ||
"//third_party/java/guava", | ||
"//third_party/java/service", | ||
], | ||
) |
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
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,11 @@ | ||
java_library( | ||
name = "opera", | ||
srcs = glob(["*.java"]), | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//java/client/src/org/openqa/selenium:core", | ||
"//java/client/src/org/openqa/selenium/remote", | ||
"//third_party/java/guava", | ||
"//third_party/java/service", | ||
], | ||
) |
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 |
---|---|---|
|
@@ -60,6 +60,7 @@ java_library( | |
exports = [ | ||
":api", | ||
":capabilities", | ||
":remote-lib", | ||
], | ||
deps = [ | ||
":api", | ||
|
Oops, something went wrong.