blob: 9f280c98e97df8961ce42f76a1fdeb42132184c6 [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
18images=(
19"debian:latest"
20)
21
22git_root=$(git rev-parse --show-toplevel)
23readonly git_root
24
25for image in "${images[@]}"; do
26 docker pull "${image}"
27 docker run --rm --entrypoint=/bin/bash --volume="${git_root}:/src:ro" "${image}" -c """
28set -exuo pipefail
29
30# Common setup
31export DEBIAN_FRONTEND=noninteractive
32apt-get -qq update
33apt-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
38cd /src
39tests/scripts/run_tests.sh
40"""
41done