-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathBUILD
55 lines (51 loc) · 1.59 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
49
50
51
52
53
54
55
package(default_testonly = 1)
[
# All of these tests use the "hello" binary to see
# whether different invocations of `nixpkgs_package`
# produce a valid bazel repository.
sh_test(
name= "run-{0}".format(test),
srcs = ["test_bin.sh"],
args=["$(location @{0}//:bin)".format(test)],
data = ["@{0}//:bin".format(test)],
timeout = "short",
) for test in [
"hello",
"expr-test",
"attribute-test",
"expr-attribute-test",
"nix-file-test",
"nix-file-deps-test",
"nixpkgs-git-repository-test",
]
] \
+ \
[
# These tests use the nix package generated by ./output.nix
# Checks whether the `:include` filegroup of `nixpkgs_package`
# repositories works as intended
# (that the expected number of files are inside the target)
sh_test(
name = "run-test-include",
srcs = ["test_output.sh"],
data = ["@output-filegroup-test//:include"],
args = ["2", "$(locations @output-filegroup-test//:include)"],
timeout = "short",
),
# Checks whether specifying a manual filegroup in the
# `nixpkgs_package` BUILD file works as well.
sh_test(
name = "run-test-manual-filegroup",
srcs = ["test_output.sh"],
data = ["@output-filegroup-manual-test//:manual-filegroup"],
args = [
"3",
"$(locations @output-filegroup-manual-test//:manual-filegroup)"],
timeout = "short",
)
]
# Test nixpkgs_cc_configure() by building some CC code.
cc_binary(
name = "cc-test",
srcs = ["cc-test.cc"],
)