tracks/haskell/.travis.yml in trackler-2.0.6.28 vs tracks/haskell/.travis.yml in trackler-2.0.6.29

- old
+ new

@@ -37,66 +37,12 @@ configlet . # Check basic track configuration. hlint ${TRAVIS_BUILD_DIR} # Run `hlint` on the entire repository. # Explicit set exercises' resolver only if it's not the current one. if [ "${CURRENT}" != "YES" ]; then - SET_RESOLVER="--resolver ${RESOLVER}" + export SET_RESOLVER="--resolver ${RESOLVER}" fi - test_exercise () { - stack test ${SET_RESOLVER} `# Select the correct resolver. `\ - --install-ghc `# Download GHC if not in cache.`\ - --no-terminal `# Terminal detection is broken.`\ - --pedantic `# Enable -Wall and -Werror. ` - } - for exercise in ${TRAVIS_BUILD_DIR}/exercises/*/ ; do - exercisename=$(basename "$exercise") - pushd ${exercise} - - examplename="stub" - buildfolder="${TRAVIS_BUILD_DIR}/build/${exercisename}/${examplename}" - mkdir -p "${buildfolder}" - cp -rL stack.yaml package.yaml src test "${buildfolder}" - - pushd $buildfolder - - examplecache="${HOME}/.foldercache/${exercisename}/${examplename}/.stack-work" - mkdir -p "$examplecache" - ln -f -s "$examplecache" - - if [ -f "${exercise}/.meta/DONT-TEST-STUB" ]; then - echo "only building stub" - stack build ${SET_RESOLVER} --install-ghc --no-terminal - else - echo "testing stub" - stack test ${SET_RESOLVER} --install-ghc --no-terminal --no-run-tests - fi - - popd - - if ! stat -t examples/*/ > /dev/null 2>&1; then - echo "No examples for ${exercise}!" - exit 1 - else - for example in examples/*/ ; do - examplename=$(basename "$example") - - buildfolder="${TRAVIS_BUILD_DIR}/build/${exercisename}/${examplename}" - mkdir -p "${buildfolder}" - cp -rL stack.yaml test ${example}/* "${buildfolder}" - - pushd $buildfolder - - examplecache="${HOME}/.foldercache/${exercisename}/${examplename}/.stack-work" - mkdir -p "$examplecache" - ln -f -s "$examplecache" - - echo "testing ${example}" - test_exercise - - popd - done - fi - - popd + bin/test-stub $exercise + bin/test-all-examples $exercise done