/[gentoo-projects]/pax-utils/tests/lib.sh
Gentoo

Contents of /pax-utils/tests/lib.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sun Feb 14 01:14:17 2010 UTC (4 years, 2 months ago) by vapier
Branch: MAIN
File MIME type: text/x-sh
start some scanelf tests

1 # no out of tree building so shut it
2 srcdir=`cd "${0%/*}" && pwd`
3 top_srcdir=`cd "${srcdir}/../.." && pwd`
4 builddir=${srcdir}
5 top_builddir=${top_srcdir}
6
7 PATH=${top_builddir}:${PATH}
8
9 [ -e /etc/init.d/functions.sh ] && source /etc/init.d/functions.sh
10
11 ret=0
12
13 testit() {
14 local tret=0 err
15 case $# in
16 1)
17 if [ -s $1 ] ; then
18 tret=1
19 err=$(<$1)
20 fi
21 ;;
22 2)
23 if ! err=`diff -u $1 $2` ; then
24 tret=1
25 fi
26 esac
27 if [ ${tret} -eq 0 ] ; then
28 echo ${GOOD}PASS${NORMAL}: $1
29 else
30 ret=1
31 echo ${BAD}FAIL${NORMAL}: $1
32 echo "${err}"
33 fi
34 rm -f $1
35 }

  ViewVC Help
Powered by ViewVC 1.1.20