Add some comments to unittest_test.sh (#159)

This commit is contained in:
c-parsons 2019-06-04 11:28:45 -04:00 committed by GitHub
parent 202db59ecc
commit efd3bfd0f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -58,6 +58,7 @@ load("//lib:unittest.bzl", "register_unittest_toolchains")
register_unittest_toolchains() register_unittest_toolchains()
EOF EOF
# Copy relevant skylib sources into the current workspace.
mkdir -p tests mkdir -p tests
touch tests/BUILD touch tests/BUILD
cat > tests/BUILD <<EOF cat > tests/BUILD <<EOF
@ -77,6 +78,10 @@ EOF
ln -sf "$(rlocation bazel_skylib/lib/types.bzl)" lib/types.bzl ln -sf "$(rlocation bazel_skylib/lib/types.bzl)" lib/types.bzl
ln -sf "$(rlocation bazel_skylib/lib/unittest.bzl)" lib/unittest.bzl ln -sf "$(rlocation bazel_skylib/lib/unittest.bzl)" lib/unittest.bzl
mkdir -p toolchains/unittest
ln -sf "$(rlocation bazel_skylib/toolchains/unittest/BUILD)" toolchains/unittest/BUILD
# Create test files.
mkdir -p testdir mkdir -p testdir
cat > testdir/BUILD <<EOF cat > testdir/BUILD <<EOF
load("//tests:unittest_tests.bzl", load("//tests:unittest_tests.bzl",
@ -97,9 +102,6 @@ fail_unexpected_passing_fake_rule(
name = "fail_unexpected_passing_fake_target", name = "fail_unexpected_passing_fake_target",
tags = ["manual"]) tags = ["manual"])
EOF EOF
mkdir -p toolchains/unittest
ln -sf "$(rlocation bazel_skylib/toolchains/unittest/BUILD)" toolchains/unittest/BUILD
} }
function test_basic_passing_test() { function test_basic_passing_test() {