echo "::set-env name=test_dir::${{ runner.temp }}\test"
echo "::set-env name=VALGRIND::NO_VALGRIND"
echo "::set-env name=SEVERITY::3"
+ echo "::set-env name=separator::\"
mkdir ${{ env.test_dir }}
make VALGRIND=NO_VALGRIND SEVERITY=3 GWION_TEST_DIR=${{ env.test_dir }} test
: "${SEVERITY:=11}"
: "${severity:=$SEVERITY}"
+
+: "${separator:=/}"
+
+
assert_returns() {
[ "$1" -eq 0 ] && return 0
[ "$1" -eq 139 ] && echo "segfault" > "$2"
local n file log ret
n=$2
file=$1
- log=${GWION_TEST_DIR}/${GWION_TEST_PREFIX}$(printf "%04i" "$n")
- slog=${GWION_TEST_DIR}/${GWION_TEST_PREFIX}$(printf "%04i" "$n").std.log
- elog=${GWION_TEST_DIR}/${GWION_TEST_PREFIX}$(printf "%04i" "$n").err.log
- vlog=${GWION_TEST_DIR}/${GWION_TEST_PREFIX}$(printf "%04i" "$n").valgrind.log
- rlog=${GWION_TEST_DIR}/${GWION_TEST_PREFIX}$(printf "%04i" "$n").log
+ log=${GWION_TEST_DIR}${separator}${GWION_TEST_PREFIX}$(printf "%04i" "$n")
+ slog=${GWION_TEST_DIR}${separator}${GWION_TEST_PREFIX}$(printf "%04i" "$n").std.log
+ elog=${GWION_TEST_DIR}${separator}${GWION_TEST_PREFIX}$(printf "%04i" "$n").err.log
+ vlog=${GWION_TEST_DIR}${separator}${GWION_TEST_PREFIX}$(printf "%04i" "$n").valgrind.log
+ rlog=${GWION_TEST_DIR}${separator}${GWION_TEST_PREFIX}$(printf "%04i" "$n").log
if [ "$VALGRIND" == "NO_VALGRIND" ]
then LANG=C ./"$PRG" "$GWOPT" -d "$DRIVER" "$file" > "$slog" 2>"$elog" |:
else
wait
for i in $(seq "$offset" "$n")
do
- read_test "${GWION_TEST_DIR}/${GWION_TEST_PREFIX}$(printf "%04i" "$i").log"
+ read_test "${GWION_TEST_DIR}${separator}${GWION_TEST_PREFIX}$(printf "%04i" "$i").log"
done
offset=$((offset + async));
fi
wait
local rest=$(( $((n-base-1)) %async))
for i in $(seq $((n-rest)) $((n-1)))
- do read_test "${GWION_TEST_DIR}/${GWION_TEST_PREFIX}$(printf "%04i" "$i").log"
+ do read_test "${GWION_TEST_DIR}${separator}${GWION_TEST_PREFIX}$(printf "%04i" "$i").log"
done
}
fi
}
clean() {
- rm -f ${GWION_TEST_DIR}/{${GWION_TEST_PREFIX}{*.log,bailout},In.gw}
+ rm -f ${GWION_TEST_DIR}${separator}{${GWION_TEST_PREFIX}{*.log,bailout},In.gw}
}
[ -f test.log ] && rm test.log