linuxcnc/tests/module-loading/rtapi-app-main-fails/checkresult
Edward Tomasz Napierala 8033574151 Fix two regression tests to work under FreeBSD.
This adapts them to a different spelling of FreeBSD error messages.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2016-06-14 16:01:45 -05:00

22 lines
534 B
Bash
Executable file

#!/bin/sh
STDERR=$(dirname $1)/stderr
if [ ! -f $STDERR ]; then
echo "stderr file not found!"
exit 1
fi
# Linux spelling of ERANGE
if egrep -q 'rtapi_app_main_fails.* Numerical result out of range' $STDERR; then
echo "loadrt found the test component, and it failed to load"
exit 0
fi
# FreeBSD spelling of ERANGE
if egrep -q 'rtapi_app_main_fails.* Result too large' $STDERR; then
echo "loadrt found the test component, and it failed to load"
exit 0
fi
echo "loadrt did not find the test component"
exit 1