Brian Silverman | 7d89e28 | 2021-11-17 17:36:54 -0800 | [diff] [blame^] | 1 | #!/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 | |
| 16 | set -euo pipefail |
| 17 | |
| 18 | images=( |
| 19 | "debian:latest" |
| 20 | ) |
| 21 | |
| 22 | git_root=$(git rev-parse --show-toplevel) |
| 23 | readonly git_root |
| 24 | |
| 25 | for image in "${images[@]}"; do |
| 26 | docker pull "${image}" |
| 27 | docker run --rm --entrypoint=/bin/bash --volume="${git_root}:/src:ro" "${image}" -c """ |
| 28 | set -exuo pipefail |
| 29 | |
| 30 | # Common setup |
| 31 | export DEBIAN_FRONTEND=noninteractive |
| 32 | apt-get -qq update |
| 33 | apt-get -qq -y install apt-utils curl pkg-config zip g++ zlib1g-dev unzip python gnupg2 libtinfo5 >/dev/null |
| 34 | # The above command gives some verbose output that can not be silenced easily. |
| 35 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288778 |
| 36 | |
| 37 | # Run tests |
| 38 | cd /src |
| 39 | tests/scripts/run_tests.sh |
| 40 | """ |
| 41 | done |