Buildified the world again.
bzl files were pretty off.
Change-Id: Ief87d7c0a08c6706c8c6c573afef95a6d51968e7
diff --git a/aos/BUILD b/aos/BUILD
index cbe31c6..cf58f4a 100644
--- a/aos/BUILD
+++ b/aos/BUILD
@@ -461,16 +461,16 @@
"testdata/backwards.json",
"testdata/config1.json",
"testdata/config1_bad.json",
+ "testdata/config1_multinode.json",
"testdata/config2.json",
+ "testdata/config2_multinode.json",
"testdata/config3.json",
"testdata/expected.json",
+ "testdata/expected_multinode.json",
"testdata/invalid_destination_node.json",
"testdata/invalid_nodes.json",
"testdata/invalid_source_node.json",
"testdata/self_forward.json",
- "testdata/expected_multinode.json",
- "testdata/config1_multinode.json",
- "testdata/config2_multinode.json",
"//aos/events:pingpong_config.json",
"//aos/events:pong.bfbs",
],
diff --git a/aos/logging/BUILD b/aos/logging/BUILD
index 1aaa2db..4931696 100644
--- a/aos/logging/BUILD
+++ b/aos/logging/BUILD
@@ -143,10 +143,10 @@
":sizes",
"//aos:die",
"//aos:macros",
- "@com_google_absl//absl/base",
"//aos/ipc_lib:queue",
"//aos/mutex",
"//aos/time",
"//aos/type_traits",
+ "@com_google_absl//absl/base",
],
)
diff --git a/aos/seasocks/gen_embedded.bzl b/aos/seasocks/gen_embedded.bzl
index 34d4bd8..93cdc39 100644
--- a/aos/seasocks/gen_embedded.bzl
+++ b/aos/seasocks/gen_embedded.bzl
@@ -1,16 +1,16 @@
def _gen_embedded_impl(ctx):
- ctx.action(
- inputs = ctx.files.srcs,
- outputs = [ ctx.outputs.source ],
- executable = ctx.executable._gen_embedded,
- arguments = [ ctx.outputs.source.path ] + [f.path for f in ctx.files.srcs],
- progress_message = 'Generating %s' % ctx.outputs.source.short_path,
- mnemonic = 'GenEmbedded',
- )
+ ctx.action(
+ inputs = ctx.files.srcs,
+ outputs = [ctx.outputs.source],
+ executable = ctx.executable._gen_embedded,
+ arguments = [ctx.outputs.source.path] + [f.path for f in ctx.files.srcs],
+ progress_message = "Generating %s" % ctx.outputs.source.short_path,
+ mnemonic = "GenEmbedded",
+ )
- return struct(
- files = depset([ ctx.outputs.source ]),
- )
+ return struct(
+ files = depset([ctx.outputs.source]),
+ )
_do_gen_embedded = rule(
attrs = {
@@ -42,19 +42,19 @@
"""
def gen_embedded(name, srcs, visibility = None):
- _do_gen_embedded(
- name = name + '__do_gen',
- visibility = ['//visibility:private'],
- srcs = srcs,
- )
- native.cc_library(
- name = name,
- visibility = visibility,
- linkstatic = True,
- srcs = [
- ':%s__do_gen' % name,
- ],
- deps = [
- '@//third_party/seasocks',
- ],
- )
+ _do_gen_embedded(
+ name = name + "__do_gen",
+ visibility = ["//visibility:private"],
+ srcs = srcs,
+ )
+ native.cc_library(
+ name = name,
+ visibility = visibility,
+ linkstatic = True,
+ srcs = [
+ ":%s__do_gen" % name,
+ ],
+ deps = [
+ "@//third_party/seasocks",
+ ],
+ )
diff --git a/aos/vision/download/downloader.bzl b/aos/vision/download/downloader.bzl
index 7100ab7..34a1ec7 100644
--- a/aos/vision/download/downloader.bzl
+++ b/aos/vision/download/downloader.bzl
@@ -1,31 +1,33 @@
def _aos_vision_downloader_impl(ctx):
- all_files = ctx.files.srcs
- ctx.file_action(
- output = ctx.outputs.executable,
- executable = True,
- content = '\n'.join([
- '#!/bin/bash',
- 'set -e',
- 'cd "${BASH_SOURCE[0]}.runfiles/%s"' % ctx.workspace_name,
- ] + [
- 'exec %s %s -- %s "$@"' % (ctx.executable._downloader.short_path,
- ' '.join([src.short_path for src in all_files]),
- ctx.attr.default_target),
- ]),
- )
+ all_files = ctx.files.srcs
+ ctx.file_action(
+ output = ctx.outputs.executable,
+ executable = True,
+ content = "\n".join([
+ "#!/bin/bash",
+ "set -e",
+ 'cd "${BASH_SOURCE[0]}.runfiles/%s"' % ctx.workspace_name,
+ ] + [
+ 'exec %s %s -- %s "$@"' % (
+ ctx.executable._downloader.short_path,
+ " ".join([src.short_path for src in all_files]),
+ ctx.attr.default_target,
+ ),
+ ]),
+ )
- to_download = all_files
+ to_download = all_files
- return struct(
- runfiles = ctx.runfiles(
- files = to_download + ctx.files._downloader,
- collect_data = True,
- collect_default = True,
- ),
- files = set([ctx.outputs.executable]),
- )
+ return struct(
+ runfiles = ctx.runfiles(
+ files = to_download + ctx.files._downloader,
+ collect_data = True,
+ collect_default = True,
+ ),
+ files = set([ctx.outputs.executable]),
+ )
-'''Creates a binary which downloads code to a robot camera processing unit.
+"""Creates a binary which downloads code to a robot camera processing unit.
Running this with `bazel run` will actually download everything.
@@ -33,22 +35,22 @@
srcs: The files to download. They currently all get shoved into one folder.
default_target: The default host to download to. If not specified, defaults to
root@10.9.71.179.
-'''
+"""
aos_vision_downloader = rule(
- implementation = _aos_vision_downloader_impl,
- attrs = {
- '_downloader': attr.label(
- executable = True,
- cfg = 'host',
- default = Label('//aos/vision/download:downloader'),
- ),
- 'srcs': attr.label_list(
- mandatory = True,
- allow_files = True,
- ),
- 'default_target': attr.string(
- default = 'root@10.9.71.179',
- ),
- },
- executable = True,
+ implementation = _aos_vision_downloader_impl,
+ attrs = {
+ "_downloader": attr.label(
+ executable = True,
+ cfg = "host",
+ default = Label("//aos/vision/download:downloader"),
+ ),
+ "srcs": attr.label_list(
+ mandatory = True,
+ allow_files = True,
+ ),
+ "default_target": attr.string(
+ default = "root@10.9.71.179",
+ ),
+ },
+ executable = True,
)