• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:fail +full:- +full:under

5 # Licensed under the Apache License, Version 2.0 (the "License");
9 # http://www.apache.org/licenses/LICENSE-2.0
12 # distributed under the License is distributed on an "AS IS" BASIS,
15 # limitations under the License.
20 # analysis-phase tests written with unittest.bzl appropriately
23 # --- begin runfiles.bash initialization ---
24 set -euo pipefail
25 if [[ ! -d "${RUNFILES_DIR:-/dev/null}" && ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
26 if [[ -f "$0.runfiles_manifest" ]]; then
28 elif [[ -f "$0.runfiles/MANIFEST" ]]; then
30 elif [[ -f "$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
34 if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
36 elif [[ -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
37 source "$(grep -m1 "^bazel_tools/tools/bash/runfiles/runfiles.bash " \
38 "$RUNFILES_MANIFEST_FILE" | cut -d ' ' -f 2-)"
43 # --- end runfiles.bash initialization ---
49 local -r pkg="$1"
50 mkdir -p "$pkg"
62 mkdir -p tests
67 ln -sf "$(rlocation $TEST_WORKSPACE/tests/unittest_tests.bzl)" tests/unittest_tests.bzl
69 mkdir -p lib
74 ln -sf "$(rlocation $TEST_WORKSPACE/lib/dicts.bzl)" lib/dicts.bzl
75 ln -sf "$(rlocation $TEST_WORKSPACE/lib/new_sets.bzl)" lib/new_sets.bzl
76 ln -sf "$(rlocation $TEST_WORKSPACE/lib/partial.bzl)" lib/partial.bzl
77 ln -sf "$(rlocation $TEST_WORKSPACE/lib/sets.bzl)" lib/sets.bzl
78 ln -sf "$(rlocation $TEST_WORKSPACE/lib/types.bzl)" lib/types.bzl
79 ln -sf "$(rlocation $TEST_WORKSPACE/lib/unittest.bzl)" lib/unittest.bzl
81 mkdir -p toolchains/unittest
83 sed -e '/package(default_applicable_licenses = .*)/d' \
88 mkdir -p testdir
128 local -r pkg="${FUNCNAME[0]}"
131 bazel test testdir:basic_passing_test >"$TEST_log" 2>&1 || fail "Expected test to pass"
137 local -r pkg="${FUNCNAME[0]}"
140 bazel test testdir:basic_failing_test --test_output=all --verbose_failures \
141 >"$TEST_log" 2>&1 && fail "Expected test to fail" || true
147 local -r pkg="${FUNCNAME[0]}"
150 bazel test testdir:shell_escape_failure_message_test --test_output=all --verbose_failures \
151 >"$TEST_log" 2>&1 && fail "Expected test to fail" || true
157 local -r pkg="${FUNCNAME[0]}"
160 bazel test testdir:cmd_escape_failure_message_test --test_output=all --verbose_failures \
161 >"$TEST_log" 2>&1 && fail "Expected test to fail" || true
167 local -r pkg="${FUNCNAME[0]}"
170 bazel test testdir:eof_failure_message_test --test_output=all --verbose_failures \
171 >"$TEST_log" 2>&1 && fail "Expected test to fail" || true
177 local -r pkg="${FUNCNAME[0]}"
180 bazel test testdir:fail_unexpected_passing_test --test_output=all --verbose_failures \
181 >"$TEST_log" 2>&1 && fail "Expected test to fail" || true