File: BUILD

package info (click to toggle)
bazel-skylib 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 880 kB
  • sloc: sh: 1,031; cpp: 83; makefile: 5
file content (46 lines) | stat: -rw-r--r-- 880 bytes parent folder | download
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
# This package aids testing the 'diff_test' rule.

load("//rules:diff_test.bzl", "diff_test")

licenses(["notice"])

package(default_testonly = 1)

sh_test(
    name = "diff_test_tests",
    srcs = ["diff_test_tests.sh"],
    data = [
        "//rules:diff_test",
        "//tests:unittest.bash",
    ],
    # Test marked local because it uses bazel.
    tags = ["local"],
    deps = ["@bazel_tools//tools/bash/runfiles"],
)

diff_test(
    name = "same_src_src",
    file1 = "a.txt",
    file2 = "aa.txt",
)

diff_test(
    name = "same_src_gen",
    file1 = "a.txt",
    file2 = "a-gen.txt",
)

diff_test(
    name = "same_gen_gen",
    file1 = "a-gen.txt",
    file2 = "aa-gen.txt",
)

genrule(
    name = "gen",
    outs = [
        "a-gen.txt",
        "aa-gen.txt",
    ],
    cmd = "echo -n 'potato' > $(location a-gen.txt) && echo -n 'potato' > $(location aa-gen.txt)",
)