blob: e36ff78f124519b365b20d42d5c0edc359d5bec0 [file] [log] [blame]
Brian Silverman7d89e282021-11-17 17:36:54 -08001#!/bin/bash
2# Copyright 2018 The Bazel Authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16set -euo pipefail
17
18source "$(dirname "${BASH_SOURCE[0]}")/bazel.sh"
19"${bazel}" version
20
21# Generate some files needed for the tests.
22"${bazel}" fetch @io_bazel_rules_go//tests/core/cgo:all
23"$("${bazel}" info output_base)/external/io_bazel_rules_go/tests/core/cgo/generate_imported_dylib.sh"
24
25# We exclude the following targets:
26# - cc_libs_test from rules_go because it assumes that stdlibc++ has been dynamically linked, but we
27# link it statically on linux.
28# - opts_test from rules_go because its include path assumes that the main repo is rules_go (see
29# https://github.com/bazelbuild/rules_go/issues/2955).
30"${bazel}" --bazelrc=/dev/null test "${common_test_args[@]}" \
31 //tests/foreign:pcre \
32 @git2//:all \
33 @openssl//:libssl \
34 $("${bazel}" query 'attr(timeout, short, tests(@com_google_absl//absl/...))') \
35 $("${bazel}" query 'tests(@io_bazel_rules_go//tests/core/cgo:all) except set(@io_bazel_rules_go//tests/core/cgo:cc_libs_test @io_bazel_rules_go//tests/core/cgo:opts_test)')