/usr/src/blcr-0.8.5/tests/RUN_ME.in is in blcr-dkms 0.8.5-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | #!/bin/sh
##
## This script sets up the envirnoment as needed.
## So, run this script instead of running these tests directly.
##
## To run a subset of tests, pass them as script arguments.
##
## This script creates temporary files in a subdirectory of
## $TMPDIR (defaulting to /tmp if $TMPDIR is unset).
##
# The bulk of this file is based on the "check-TESTS" target
# in a Makefile.in generated by automake, which carries the
# following two notices:
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# End of legal notices
if (/sbin/lsmod | grep '^blcr ' > /dev/null 2>&1); then
true
else
echo '#############################################################'
echo '#### BLCR modules are not loaded. Cannot run the tests! ####'
echo '#### You must insmod/modprobe the following modules as ####'
echo '#### root (in order) before you can run the test suite. ####'
echo '#### blcr_imports blcr_vmadump blcr ####'
echo '#############################################################'
exit 1
fi
#
init_dir=`pwd`
cr_testsdir=`dirname $0`
case "$cr_testsdir" in
/*) ;;
*) cr_testsdir="$init_dir/$cr_testsdir";;
esac
export cr_testsdir
tmp_dir=`mktemp -d "${TMPDIR:-/tmp}/blcrtests.XXXXXXXXXX"` || exit 1
cd $tmp_dir
#
export LIBCR_DISABLE_NSCD=1
top_srcdir="INVALID"; export top_srcdir
cr_checkpoint="%bindir%/cr_checkpoint"; export cr_checkpoint
cr_restart="%bindir%/cr_restart"; export cr_restart
cr_run="%cr_run%"; export cr_run
cr_pwd="%cr_pwd%"; export cr_pwd
count=0; FAIL=0; PASS=0; SKIP=0;
if test $# -eq 0; then
list="%tests%"
else
list="$*"
fi
#
for tst in $list; do
$cr_testsdir/$tst
case $? in
0) result=PASS; count=`expr $count + 1`;;
77) result=SKIP;;
*) result=FAIL; count=`expr $count + 1`;;
esac
echo "${result}: $tst"
eval "$result=\`expr \$$result + 1\`"
done
if test $FAIL -eq 0; then
banner="All $count tests passed"
else
banner="$FAIL of $count tests failed"
fi
dashes="$banner"
if test $SKIP -ne 0; then
skipped="($SKIP tests were not run)"
if test `echo "$banner"|wc -c` -lt `echo "$skipped"|wc -c`; then
dashes="$skipped"
fi
fi
dashes=`echo "$dashes" | sed s/./=/g`
echo "$dashes"
echo "$banner"
if test "$SKIP" -ne 0; then
echo "$skipped"
fi
echo "$dashes"
cd $init_dir
sleep 2 # avoid NFS "issues"
rm -Rf $tmp_dir
test $FAIL -eq 0
exit $?
|