Skip to content

Commit dea4d34

Browse files
Yannicjart
authored andcommitted
Remove flaky test on macOS (#264)
1 parent f04ee86 commit dea4d34

File tree

5 files changed

+24
-26
lines changed

5 files changed

+24
-26
lines changed

.bazelci/presubmit.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,4 @@ platforms:
1414
build_targets:
1515
- "..."
1616
test_targets:
17-
- "--"
1817
- "..."
19-
# See https://github.com/bazelbuild/rules_closure/issues/247
20-
- "-//closure/testing/test:noto_fonts_render_as_expected"

.travis.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ before_install:
3333
3434
script:
3535
- |
36-
excludes=()
37-
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
38-
# https://github.com/bazelbuild/rules_closure/issues/247
39-
excludes+=('//closure/testing/test:noto_fonts_render_as_expected')
40-
fi
41-
42-
targets=$(bazel query "... except set($excludes)")
4336
bazel \
4437
--output_base=$HOME/.cache/bazel \
4538
--batch \
@@ -54,7 +47,7 @@ script:
5447
--local_resources=400,2,1.0 \
5548
--strategy=Javac=worker \
5649
--strategy=Closure=worker \
57-
$targets
50+
...
5851
5952
notifications:
6053
email: false

closure/compiler/closure_js_library.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def closure_js_library_impl(
4444
srcs, deps, testonly, suppress,
4545
closure_library_base, closure_library_deps, _ClosureWorker,
4646

47-
includes=[],
47+
includes=(),
4848
exports=depset(),
4949
internal_descriptors=depset(),
5050
convention='CLOSURE',

closure/protobuf/closure_proto_library.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ load("//closure/private:defs.bzl",
2222
"CLOSURE_LIBRARY_DEPS_ATTR",
2323
"unfurl")
2424

25-
# This was taken from https://github.com/bazelbuild/rules_go/blob/67f44035d84a352cffb9465159e199066ecb814c/proto/compiler.bzl#L72
25+
# This was borrowed from Rules Go, licensed under Apache 2.
26+
# https://github.com/bazelbuild/rules_go/blob/67f44035d84a352cffb9465159e199066ecb814c/proto/compiler.bzl#L72
2627
def _proto_path(proto):
2728
path = proto.path
2829
root = proto.root.path

closure/testing/test/BUILD

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,23 @@ genrule(
8888
tools = ["//third_party/phantomjs"],
8989
)
9090

91-
files_equal_test(
92-
name = "noto_fonts_render_as_expected",
93-
actual = "fontdemo-generated.png",
94-
golden = select({
95-
":darwin": "fontdemo-darwin.png",
96-
"//conditions:default": "fontdemo.png",
97-
}),
98-
)
99-
100-
config_setting(
101-
name = "darwin",
102-
values = {"cpu": "darwin"},
103-
)
91+
# This test shows how to write tests to verify rendered output from phantomjs.
92+
# However, you shouln't do this because the output image depends on a lot of
93+
# external factors like operating system, GPU, ..., and therefore has a
94+
# very hight chance of being flaky.
95+
# https://github.com/bazelbuild/rules_closure/issues/247
96+
# https://github.com/bazelbuild/rules_closure/pull/186#issuecomment-279115018
97+
#
98+
# files_equal_test(
99+
# name = "noto_fonts_render_as_expected",
100+
# actual = "fontdemo-generated.png",
101+
# golden = select({
102+
# ":darwin": "fontdemo-darwin.png",
103+
# "//conditions:default": "fontdemo.png",
104+
# }),
105+
# )
106+
#
107+
# config_setting(
108+
# name = "darwin",
109+
# values = {"cpu": "darwin"},
110+
# )

0 commit comments

Comments
 (0)