File: do-unit.sh

package info (click to toggle)
ndpi 4.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 164,552 kB
  • sloc: ansic: 58,816; cpp: 14,558; python: 2,079; makefile: 683; sh: 287; objc: 70; ruby: 28; exp: 4
file content (32 lines) | stat: -rwxr-xr-x 436 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
#!/bin/sh

cd "$(dirname "${0}")"

UNIT="./unit/unit"

RC=0

check_unit() {

    case "$CXXFLAGS" in
	# Skipping tests with sanitizer enabled due to use-of-uninitialized-value in json-c
	*sanitize* )
	    echo "Skipping unit tests for this environment"
	    return
	    ;;
	* )
	    echo ""
	    echo "Running unit tests.."
	    ;;
    esac

    $UNIT
    UNIT_RC=$?
    if [ $UNIT_RC -ne 0 ]; then
	RC=1
    fi
}

check_unit

exit $RC