Skip to content

Commit

Permalink
[rb] Add sizes for Bazel test targets
Browse files Browse the repository at this point in the history
This allows to make Ruby on par with Java and Python, so you can run all
unit / integration tests by:

  bazel test --test_size_filters small //rb/... # unit
  bazel test --test_size_filters large //rb/... # integration (browsers)
  • Loading branch information
p0deje committed May 3, 2023
1 parent 35827eb commit ab94305
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rb/spec/integration/selenium/webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rb_library(
[
rb_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
Expand All @@ -48,6 +49,7 @@ rb_library(

rb_test(
name = "bidi",
size = "large",
srcs = ["bidi_spec.rb"],
args = ["rb/spec/"],
env = ENV,
Expand All @@ -62,6 +64,7 @@ rb_test(

rb_test(
name = "devtools",
size = "large",
srcs = ["devtools_spec.rb"],
args = ["rb/spec/"],
env = ENV,
Expand All @@ -76,6 +79,7 @@ rb_test(

rb_test(
name = "driver",
size = "large",
srcs = ["driver_spec.rb"],
args = ["rb/spec/"],
env = ENV,
Expand All @@ -94,6 +98,7 @@ rb_test(

rb_test(
name = "element",
size = "large",
srcs = ["element_spec.rb"],
args = ["rb/spec/"],
env = ENV,
Expand Down
1 change: 1 addition & 0 deletions rb/spec/integration/selenium/webdriver/bidi/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
Expand Down
1 change: 1 addition & 0 deletions rb/spec/integration/selenium/webdriver/chrome/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
Expand Down
1 change: 1 addition & 0 deletions rb/spec/integration/selenium/webdriver/edge/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
Expand Down
1 change: 1 addition & 0 deletions rb/spec/integration/selenium/webdriver/firefox/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
Expand Down
1 change: 1 addition & 0 deletions rb/spec/integration/selenium/webdriver/remote/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
Expand Down
1 change: 1 addition & 0 deletions rb/spec/integration/selenium/webdriver/safari/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "large",
srcs = [file],
args = ["rb/spec/"],
env = ENV,
Expand Down
2 changes: 2 additions & 0 deletions rb/spec/unit/selenium/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package(default_visibility = ["//rb:__subpackages__"])

rb_test(
name = "devtools",
size = "small",
srcs = ["devtools_spec.rb"],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand All @@ -16,6 +17,7 @@ rb_test(

rb_test(
name = "server",
size = "small",
srcs = ["server_spec.rb"],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/devtools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package(default_visibility = ["//rb:__subpackages__"])

rb_test(
name = "cdp_client_generator",
size = "small",
srcs = ["cdp_client_generator_spec.rb"],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rb_library(
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/chrome/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/devtools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/edge/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/firefox/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/ie/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/remote/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/remote/http/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/safari/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down
1 change: 1 addition & 0 deletions rb/spec/unit/selenium/webdriver/support/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package(default_visibility = ["//rb:__subpackages__"])
[
rb_test(
name = file[:-8],
size = "small",
srcs = [file],
args = ["rb/spec/"],
main = "@bundle//:bin/rspec",
Expand Down

0 comments on commit ab94305

Please sign in to comment.