aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorc-parsons <cparsons@google.com>2019-05-07 16:25:43 -0400
committerGitHub <noreply@github.com>2019-05-07 16:25:43 -0400
commit84a12d1084bd156b4c0ed3f313299d2afdb5fe43 (patch)
treedb207372135a54cb479ecaf444f0998f55b5ff6c /tests
parent67215655bf6ce349b2b88ae4f5945a706f8ce959 (diff)
downloadbazel-skylib-84a12d1084bd156b4c0ed3f313299d2afdb5fe43.tar.gz
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
Diffstat (limited to 'tests')
-rw-r--r--tests/diff_test/BUILD2
-rwxr-xr-xtests/diff_test/diff_test_tests.sh1
-rw-r--r--tests/unittest_tests.bzl14
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/diff_test/BUILD b/tests/diff_test/BUILD
index bd0aacd..aa381d8 100644
--- a/tests/diff_test/BUILD
+++ b/tests/diff_test/BUILD
@@ -13,6 +13,8 @@ sh_test(
"//rules:diff_test",
"//tests:unittest.bash",
],
+ # Test marked local because it uses bazel.
+ tags = ["local"],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
diff --git a/tests/diff_test/diff_test_tests.sh b/tests/diff_test/diff_test_tests.sh
index aa43307..1cab39b 100755
--- a/tests/diff_test/diff_test_tests.sh
+++ b/tests/diff_test/diff_test_tests.sh
@@ -202,4 +202,5 @@ function test_from_ext_repo_without_legacy_external_runfiles() {
assert_from_ext_repo "--nolegacy_external_runfiles" "${FUNCNAME[0]}"
}
+cd "$TEST_TMPDIR"
run_suite "diff_test_tests test suite"
diff --git a/tests/unittest_tests.bzl b/tests/unittest_tests.bzl
index 01ea4de..e25e4da 100644
--- a/tests/unittest_tests.bzl
+++ b/tests/unittest_tests.bzl
@@ -1,3 +1,17 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""Unit tests for unittest.bzl."""
load("//lib:unittest.bzl", "analysistest", "asserts", "unittest")