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