1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00
mal/.travis_test.sh
Joel Martin f3ea3be300 runtest/travis: make soft mode the default.
Switch runtest.py option to --hard instead of --soft. This changes
tests marked as soft into a hard fail tests.
2015-11-09 21:16:38 -06:00

29 lines
662 B
Bash
Executable File

#!/bin/bash
set -ex
ACTION=${1}
IMPL=${2}
MAL_IMPL=${3:-js}
echo "ACTION: ${ACTION}"
echo "IMPL: ${IMPL}"
echo "MAL_IMPL: ${MAL_IMPL}"
# If NO_DOCKER is blank then launch use a docker image, otherwise use
# the Travis image/tools directly.
if [ "${NO_DOCKER}" ]; then
MAKE="make"
else
impl=$(echo "${IMPL}" | tr '[:upper:]' '[:lower:]')
img_impl=$(echo "${3:-${IMPL}}" | tr '[:upper:]' '[:lower:]')
MAKE="docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${img_impl} make"
fi
${MAKE} TEST_OPTS="--debug-file ../${ACTION}.err" \
MAL_IMPL=${MAL_IMPL} ${ACTION}^${IMPL}
# no failure so remove error log
rm -f ${ACTION}.err || true