From 53be4977e592da836dc56b907dae59d8374e0f52 Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Thu, 22 Nov 2018 14:36:59 +0000 Subject: [PATCH] [bazel]: making progress on running large tests --- .../openqa/selenium/environment/BUILD.bazel | 33 +++++++++++++++---- .../selenium/testing/drivers/BUILD.bazel | 1 + 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/java/client/test/org/openqa/selenium/environment/BUILD.bazel b/java/client/test/org/openqa/selenium/environment/BUILD.bazel index a786b292d85ee..1cac659ba0369 100644 --- a/java/client/test/org/openqa/selenium/environment/BUILD.bazel +++ b/java/client/test/org/openqa/selenium/environment/BUILD.bazel @@ -1,3 +1,10 @@ +load("//java:bazel-rules.bzl", "gen_java_tests") + +TEST_SRCS = glob([ + "**/*Test.java", + "**/*TestBase.java", +]) + java_library( name = "environment", srcs = glob( @@ -5,15 +12,13 @@ java_library( "*.java", "webserver/*.java", ], - exclude = [ - "**/*Test.java", - "**/*TestBase.java", - ], + exclude = TEST_SRCS, ), data = [ + "webserver/keystore", "//common/src/web", "//third_party/closure:goog", - ], + ] + glob(["webserver/*.java"]), visibility = [ "//java/client/test:__subpackages__", "//java/server/test:__subpackages__", @@ -28,9 +33,25 @@ java_library( ) java_binary( - name = "webserver", + name = "server", main_class = "org.openqa.selenium.environment.webserver.JettyAppServer", runtime_deps = [ ":environment", ], ) + +gen_java_tests( + size = "large", + srcs = TEST_SRCS, + jvm_flags = [ + "-Dselenium.browser=ff", + ], + deps = [ + ":environment", + "//java/client/src/org/openqa/selenium/firefox", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/test/org/openqa/selenium/testing", + "//java/client/test/org/openqa/selenium/testing/drivers", + "//third_party/java/junit", + ], +) diff --git a/java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel b/java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel index 7a561abb9a29f..f56ee93853633 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel +++ b/java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel @@ -2,6 +2,7 @@ java_library( name = "drivers", visibility = [ "//java/client/test/org/openqa/selenium/testing:__pkg__", + "//java/client/test/org/openqa/selenium/environment:__pkg__", ], exports = [ ":browser",