8 # Environment variable configuration
9 BUILD_IMPL
=${BUILD_IMPL:-${IMPL}}
10 TEST_OPTS
="${TEST_OPTS} --debug-file ../${ACTION}.err"
12 if [ "${DO_SELF_HOST}" ]; then
16 if [ "${DO_HARD}" ]; then
17 TEST_OPTS
="${TEST_OPTS} --hard"
20 echo "ACTION: ${ACTION}"
22 echo "BUILD_IMPL: ${BUILD_IMPL}"
23 echo "MAL_IMPL: ${MAL_IMPL}"
25 if [ "${NO_PERF}" -a "${ACTION}" = "perf" ]; then
26 echo "Skipping perf test"
29 if [ "${NO_SELF_HOST}" -a "${DO_SELF_HOST}" ]; then
30 echo "Skipping ${ACTION} of ${MAL_IMPL} self-host"
33 if [ "${NO_SELF_HOST_PERF}" -a "${DO_SELF_HOST}" -a "${ACTION}" = "perf" ]; then
34 echo "Skipping only perf test for ${MAL_IMPL} self-host"
38 mode_var
=${MAL_IMPL:-${IMPL}}_MODE
41 MAKE
="make ${mode_val:+${mode_var}=${mode_val}}"
43 # If NO_DOCKER is blank then launch use a docker image, otherwise use
44 # the Travis image/tools directly.
45 if [ -z "${NO_DOCKER}" ]; then
46 img_impl
=$
(echo "${MAL_IMPL:-${IMPL}}" |
tr '[:upper:]' '[:lower:]')
47 # We could just use make DOCKERIZE=1 instead but that does add
48 # non-trivial startup overhead for each step.
49 MAKE
="docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${img_impl%%-mal} ${MAKE}"
54 # rpython often fails on step9 in compute_vars_longevity
55 # so build step9, then continue wit the full build
56 if [ "${BUILD_IMPL}" = "rpython" ]; then
57 ${MAKE} -C "${BUILD_IMPL}" step9_try || true
59 ${MAKE} -C ${BUILD_IMPL}
62 [ "${ACTION}" = "perf" ] && STEP
=
63 if ! ${MAKE} TEST_OPTS
="${TEST_OPTS}" \
64 ${MAL_IMPL:+MAL_IMPL=${MAL_IMPL}} \
65 ${REGRESS:+REGRESS=${REGRESS}} \
66 ${HARD:+HARD=${HARD}} \
67 ${DEFERRABLE:+DEFERRABLE=${DEFERRABLE}} \
68 ${OPTIONAL:+OPTIONAL=${OPTIONAL}} \
69 ${ACTION}^${IMPL}${STEP:+^${STEP}}; then
70 # print debug-file on error