mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-04-29 07:29:39 +00:00
35 lines
546 B
Bash
Executable file
35 lines
546 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
cd "$(dirname "${0}")" || exit 1
|
|
|
|
ABS_BUILDDIR=@abs_top_builddir@
|
|
EXE_SUFFIX=@EXE_SUFFIX@
|
|
|
|
UNIT="${ABS_BUILDDIR}/tests/unit/unit${EXE_SUFFIX}"
|
|
|
|
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
|