Format .bzl files with buildifier

This is a part of a large-scale change: go/lsc-format-bzl-files . All .bzl files are being formatted with buildifier.

To format a file manually run `buildifier path/to/file.bzl`. Integration with `g4 fix` will be available later, but you can try using `g4 fix --format=bzl`.

Tested:
    tap_presubmit
    Some tests failed; test failures are believed to be unrelated to this CL

BEGIN_PUBLIC
Format .bzl files with buildifier
END_PUBLIC

PiperOrigin-RevId: 203461813
GitOrigin-RevId: 079b58e5340b57819c361af79e4b820f4c66e590
This commit is contained in:
Wycheproof Team
2018-07-06 04:55:56 -07:00
committed by quannguyentm
parent f22bfc7c3d
commit 202ec7ef23
2 changed files with 39 additions and 38 deletions
+30 -31
View File
@@ -3,34 +3,34 @@
"""
def add_tests(name, versions, provider_dep, srcs, deps, size, test_class, data):
"""Provider version-specific tests."""
"""Provider version-specific tests."""
for version in versions:
for version in versions:
native.java_test(
name = name + "_" + version,
srcs = srcs,
deps = deps + [
provider_dep + "_" + version,
],
size = size,
test_class = test_class,
data = data,
)
# Latest stable.
# We can't use native.alias, because aliased tests are not run.
# So, we simply duplicate the test.
native.java_test(
name = name + "_" + version,
name = name,
srcs = srcs,
deps = deps + [
provider_dep + "_" + version
provider_dep + "_" + versions[-1],
],
size = size,
test_class = test_class,
data = data,
)
# Latest stable.
# We can't use native.alias, because aliased tests are not run.
# So, we simply duplicate the test.
native.java_test(
name = name,
srcs = srcs,
deps = deps + [
provider_dep + "_" + versions[-1]
],
size = size,
test_class = test_class,
data = data,
)
# Bouncy Castle targets
bouncycastle_versions = ["1_%d" % i for i in range(49, 60)]
@@ -38,15 +38,15 @@ bouncycastle_dep = "@bouncycastle"
# These targets run all tests.
def bouncycastle_all_tests(srcs, deps, size, test_class, data):
"""BouncyCastle version-specific tests."""
"""BouncyCastle version-specific tests."""
add_tests("BouncyCastleAllTests", bouncycastle_versions, bouncycastle_dep, srcs, deps, size, test_class, data)
add_tests("BouncyCastleAllTests", bouncycastle_versions, bouncycastle_dep, srcs, deps, size, test_class, data)
# These targets exclude @SlowTest
def bouncycastle_tests(srcs, deps, size, test_class, data):
"""BouncyCastle version-specific tests."""
"""BouncyCastle version-specific tests."""
add_tests("BouncyCastleTest", bouncycastle_versions, bouncycastle_dep, srcs, deps, size, test_class, data)
add_tests("BouncyCastleTest", bouncycastle_versions, bouncycastle_dep, srcs, deps, size, test_class, data)
# Spongy Castle targets
spongycastle_versions = ["1_50", "1_51", "1_52", "1_53", "1_54", "1_56", "1_58"]
@@ -54,16 +54,15 @@ spongycastle_dep = "@spongycastle_prov"
# These targets run all tests.
def spongycastle_all_tests(srcs, deps, size, test_class, data):
"""SpongyCastle version-specific tests."""
add_tests("SpongyCastleAllTests", spongycastle_versions, spongycastle_dep, srcs, deps, size, test_class, data)
"""SpongyCastle version-specific tests."""
add_tests("SpongyCastleAllTests", spongycastle_versions, spongycastle_dep, srcs, deps, size, test_class, data)
# These targets exclude slow tests.
def spongycastle_tests(srcs, deps, size, test_class, data):
"""SpongyCastle version-specific tests."""
"""SpongyCastle version-specific tests."""
add_tests("SpongyCastleTest", spongycastle_versions, spongycastle_dep, srcs, deps, size, test_class, data)
add_tests("SpongyCastleTest", spongycastle_versions, spongycastle_dep, srcs, deps, size, test_class, data)
# Conscrypt targets
conscrypt_versions = ["1_0_1"]
@@ -71,12 +70,12 @@ conscrypt_dep = "@conscrypt"
# These targets run all tests.
def conscrypt_all_tests(srcs, deps, size, test_class, data):
"""Conscrypt version-specific tests."""
"""Conscrypt version-specific tests."""
add_tests("ConscryptAllTests", conscrypt_versions, conscrypt_dep, srcs, deps, size, test_class, data)
add_tests("ConscryptAllTests", conscrypt_versions, conscrypt_dep, srcs, deps, size, test_class, data)
# These targets exclude @SlowTest
def conscrypt_tests(srcs, deps, size, test_class, data):
"""Conscrypt version-specific tests."""
"""Conscrypt version-specific tests."""
add_tests("ConscryptTest", conscrypt_versions, conscrypt_dep, srcs, deps, size, test_class, data)
add_tests("ConscryptTest", conscrypt_versions, conscrypt_dep, srcs, deps, size, test_class, data)
+9 -7
View File
@@ -15,15 +15,17 @@ java_import(
# Meanwhile, users have to call 'bazel clean' explicitly when the
# environment changes.
def _local_jars_impl(repository_ctx):
contents = ""
if "WYCHEPROOF_BOUNCYCASTLE_JAR" in repository_ctx.os.environ:
repository_ctx.symlink(repository_ctx.os.environ["WYCHEPROOF_BOUNCYCASTLE_JAR"],
"bouncycastle.jar")
contents += _bouncycastle_jar_rule
contents = ""
if "WYCHEPROOF_BOUNCYCASTLE_JAR" in repository_ctx.os.environ:
repository_ctx.symlink(
repository_ctx.os.environ["WYCHEPROOF_BOUNCYCASTLE_JAR"],
"bouncycastle.jar",
)
contents += _bouncycastle_jar_rule
repository_ctx.file("BUILD", contents)
repository_ctx.file("BUILD", contents)
local_jars = repository_rule(
implementation = _local_jars_impl,
local = True
local = True,
)