docker_test_wrap.sh 912 Bytes
Newer Older
1
2
3
4
#!/bin/bash
# Install and test steps on Linux
set -e

5
6
7
8
9
10
11
12
13
14
15
# shim for python:alpine not having bash
if [ -f "/etc/alpine-release" ]; then
  apk update
  apk add bash
fi

if [ -z "$BASH" ]; then
  bash $0 $@
  exit $?
fi

mattip's avatar
mattip committed
16
17
18
19
20
21
22
# "python" and "pip" are already on the path as part of the docker
# startup code in choose_python.sh, but the following are required and not
# necessarily already set

PYTHON_EXE=${PYTHON_EXE:-python}
PIP_CMD=${PIP_CMD:-pip}

23
# Get needed utilities
24
MULTIBUILD_DIR=$(dirname "$0")
25
26
source $MULTIBUILD_DIR/common_utils.sh

27
28
29
# Change into root directory of repo
cd /io

30
# Configuration for this package in `config.sh`.
Andrew Murray's avatar
Andrew Murray committed
31
# This can overwrite `install_run` and `install_wheel` (called from
32
33
# `install_run`). These are otherwise defined in common_utils.sh.
# `config.sh` must define `run_tests` if using the default `install_run`.
34
35
CONFIG_PATH=${CONFIG_PATH:-config.sh}
source "$CONFIG_PATH"
36

37
install_run