File: check.sh

package info (click to toggle)
libdogleg 0.18-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 284 kB
  • sloc: ansic: 2,700; makefile: 38; sh: 16
file content (26 lines) | stat: -rwxr-xr-x 564 bytes parent folder | download
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