diff --git a/.travis.sh b/.travis.sh index 4bf4158e9..f3c52fbbf 100755 --- a/.travis.sh +++ b/.travis.sh @@ -3,23 +3,21 @@ set -e function travis_time_start { - set +x TRAVIS_START_TIME=$(date +%s%N) TRAVIS_TIME_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1) TRAVIS_FOLD_NAME=$1 echo -e "\e[0Ktraivs_fold:start:$TRAVIS_FOLD_NAME" echo -e "\e[0Ktraivs_time:start:$TRAVIS_TIME_ID" - set -x + set -x # enable debug information } function travis_time_end { - set +x + set +x # disable debug information _COLOR=${1:-32} TRAVIS_END_TIME=$(date +%s%N) TIME_ELAPSED_SECONDS=$(( ($TRAVIS_END_TIME - $TRAVIS_START_TIME)/1000000000 )) echo -e "traivs_time:end:$TRAVIS_TIME_ID:start=$TRAVIS_START_TIME,finish=$TRAVIS_END_TIME,duration=$(($TRAVIS_END_TIME - $TRAVIS_START_TIME))\n\e[0K" echo -e "traivs_fold:end:$TRAVIS_FOLD_NAME" echo -e "\e[0K\e[${_COLOR}mFunction $TRAVIS_FOLD_NAME takes $(( $TIME_ELAPSED_SECONDS / 60 )) min $(( $TIME_ELAPSED_SECONDS % 60 )) sec\e[0m" - set -x } travis_time_start setup.apt-get_update @@ -41,7 +39,30 @@ cd jskeus make travis_time_end -travis_time_start script.test source bashrc.eus -export EXIT_STATUS=0; for test_l in irteus/test/*.l; do irteusgl $test_l; export EXIT_STATUS=`expr $? + $EXIT_STATUS`; done;echo "Exit status : $EXIT_STATUS"; [ $EXIT_STATUS == 0 ] || exit 1 -travis_time_end +export EXIT_STATUS=0; +set +e + +for test_l in irteus/test/*.l; do + + travis_time_start jskeus.source.${test_l##*/}.test + + irteusgl $test_l; + export TMP_EXIT_STATUS=$? + + travis_time_end `expr 32 - $TMP_EXIT_STATUS` + + export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`; + + travis_time_start jskeus.compiled.${test_l##*/}.test + + irteusgl "(let ((o (namestring (merge-pathnames \".o\" \"$test_l\"))) (so (namestring (merge-pathnames \".so\" \"$test_l\")))) (compile-file \"$test_l\" :o o) (if (probe-file so) (load so) (exit 1))))" + export TMP_EXIT_STATUS=$? + + travis_time_end `expr 32 - $TMP_EXIT_STATUS` + + export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`; +done; +echo "Exit status : $EXIT_STATUS"; + +[ $EXIT_STATUS == 0 ] || exit 1