1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/zsh
# This is a rudimentary test. Not exhaustive. Makes sure the simple problem
# defined in sample.c can be solved. Both with sparse and dense callbacks
GREEN="\x1b[32m"
RED="\x1b[31m"
COLOR_RESET="\x1b[0m"
CMDS=('./sample --check sparse'
'./sample --check dense'
'./sample --check dense-products-packed-upper'
'./sample --check dense-products-unpacked')
for cmd ($CMDS) {
echo "Running: $cmd";
${=cmd} || anyfailed=1
}
if [[ -n "$anyfailed" ]]; then
echo -e $RED"Some tests failed"$COLOR_RESET
exit 1;
fi
exit 0
|