tests: make throw of non-strings optional/soft.
[jackhill/mal.git] / .travis_test.sh
... / ...
CommitLineData
1#!/bin/bash
2
3set -ex
4
5ACTION=${1}
6IMPL=${2}
7MAL_IMPL=${3:-js}
8
9echo "ACTION: ${ACTION}"
10echo "IMPL: ${IMPL}"
11echo "MAL_IMPL: ${MAL_IMPL}"
12
13# If NO_DOCKER is blank then launch use a docker image, otherwise use
14# the Travis image/tools directly.
15if [ "${NO_DOCKER}" ]; then
16 MAKE="make"
17else
18 impl=$(echo "${IMPL}" | tr '[:upper:]' '[:lower:]')
19 img_impl=$(echo "${3:-${IMPL}}" | tr '[:upper:]' '[:lower:]')
20
21 MAKE="docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${img_impl} make"
22fi
23
24${MAKE} TEST_OPTS="--debug-file ../${ACTION}.err" \
25 MAL_IMPL=${MAL_IMPL} ${ACTION}^${IMPL}
26
27# no failure so remove error log
28rm -f ${ACTION}.err || true