Skip to content

Commit

Permalink
Travis: add self-hosted testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanaka committed Oct 10, 2015
1 parent 0ff53c8 commit 531a98a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,17 @@ matrix:
- env: IMPL=vb

script:
# Build
- ./.travis_build.sh
- ./.travis_test.sh
- cat test.out

# Regular tests
- ./.travis_test.sh test ${IMPL}
- cat test.out; rm -f test.out

# Self-hosted tests
- ./.travis_test.sh test mal ${IMPL}
- cat test.out; rm -f test.out

# Performance tests
#- ./.travis_test.sh perf
#- cat perf.out
17 changes: 13 additions & 4 deletions .travis_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@

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 [ -z "${NO_DOCKER}" ]; then
impl=$(echo "${IMPL}" | tr '[:upper:]' '[:lower:]')

docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${impl} make TEST_OPTS="--soft --log-file ../test.out" test^${IMPL}
#docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${IMPL,,} make perf^${IMPL}
docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${impl} \
make TEST_OPTS="--soft --log-file ../${ACTION}.out" \
MAL_IMPL=${MAL_IMPL} ${ACTION}^${IMPL}
else
make TEST_OPTS="--soft --log-file ../test.out" test^${IMPL}
#make TEST_OPTS="--soft --log-file ../perf" perf^${IMPL}
make TEST_OPTS="--soft --log-file ../${ACTION}.out" \
MAL_IMPL=${MAL_IMPL} ${ACTION}^${IMPL}
fi

0 comments on commit 531a98a

Please sign in to comment.