2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-27 05:43:25 +00:00
bazel-skylib/tests/diff_test/BUILD
c-parsons 84a12d1084
Fix a number of misc issues to allow google usage of bazel-skylib (#146)
* Fix a number of misc issues to allow google usage of bazel-skylib

1. Missing copyright header
2. Shell test fixes to use TEST_TMPDIR to have write access to directories
3. diff_test fix to use TEST_SRCDIR

* added a comment as to why diff_test_tests is local

* ran buildifier
2019-05-07 16:25:43 -04:00

47 lines
880 B
Python

# 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)",
)