-
Notifications
You must be signed in to change notification settings - Fork 172
/
BUILD
48 lines (42 loc) · 1.12 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package(default_visibility = ["//visibility:public"])
ASMCLI_MODULES = glob(["asmcli/**"])
NODE_MODULES = glob(["node_modules/**"])
ASMCLI_SOURCES = glob(["asmcli/**/*.sh"], exclude = ["**/test*/**"],)
TESTS = glob(["asmcli/tests/**/*.bats"])
MERGE_OUT = ["asmcli"]
BATS_JOBS = "7" # determined emperically
genrule(
name = "merge",
srcs = ASMCLI_SOURCES,
outs = MERGE_OUT,
cmd = "$(location scripts/release-asm/merge) $(OUTS) $(SRCS)",
tools = ["scripts/release-asm/merge"],
executable = True,
)
sh_library(
name = "asmcli_modules",
data = ASMCLI_MODULES,
)
sh_library(
name = "node_modules",
data = NODE_MODULES,
)
sh_test(
name = "test",
size = "large",
srcs = ["node_modules/bats/bin/bats"],
deps = [
":asmcli_modules",
":node_modules",
],
env = {"SOURCE_FILES": '\n'.join(ASMCLI_SOURCES)},
args = TESTS + ["--jobs", BATS_JOBS, "--no-parallelize-across-files"],
)
sh_test(
name = "lint_variables",
srcs = ["asmcli/tests/lint_variables"],
deps = [
":asmcli_modules",
],
args = ["asmcli/asmcli"] + ASMCLI_SOURCES
)