Sha256: 1d789036cf3f84b4a8ed3685f2b1b428fd3516f61aa7a9a188048f7bee3a9082
Contents?: true
Size: 1 KB
Versions: 109
Compression:
Stored size: 1 KB
Contents
#!/bin/bash set -e for D in exercises/*; do CURRENT_DIR=$(pwd) if [ -d "${D}" ]; then # Get the exercise name from the test file TEST_FILE=$(basename $(ls ${D}/test/test*)) STRIPPED_OF_EXTENSION="${TEST_FILE%.*}" EXERCISE_NAME="${STRIPPED_OF_EXTENSION:5}" #remove the ignore line sed -i.bak 's/TEST_IGNORE();//' ${D}/test/test_*.c # Copy the examples with the correct name for the exercise if [ -e "${D}/src/example.c" ] then cp ${D}/src/example.c ${D}/src/${EXERCISE_NAME}.c fi if [ -e "${D}/src/example.h" ] then cp ${D}/src/example.h ${D}/src/${EXERCISE_NAME}.h fi # Make it! { cd ${D}; echo "Running tests for ${EXERCISE_NAME}"; make clean >> /dev/null; if make memcheck | grep FAIL: ; then exit 1 elif [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1 fi cd ${CURRENT_DIR}; } fi done
Version data entries
109 entries across 109 versions & 1 rubygems