~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/check_length.sh

  • Committer: Monty Taylor
  • Date: 2008-12-17 01:31:45 UTC
  • mto: This revision was merged to the branch mainline in revision 713.
  • Revision ID: mordred@camelot.inaugust.com-20081217013145-uovmjdj0a3c5cd7a
Updated check_length.sh to work with VPATH.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
failed=0
4
4
 
 
5
if test -z $BINDIR ; then
 
6
  BINDIR=.
 
7
fi
 
8
 
5
9
check_encode () {
6
 
    bytes=`./length --hex --encode $1`
 
10
    bytes=`${BINDIR}/length --hex --encode $1`
7
11
    shift
8
12
    expected="$@"
9
13
    if test "$bytes" != "$expected"; then
13
17
}
14
18
 
15
19
check_invertible () {
16
 
    bytes=`./length --encode $value`
17
 
    result=`./length --decode $bytes`
 
20
    bytes=`${BINDIR}/length --encode $value`
 
21
    result=`${BINDIR}/length --decode $bytes`
18
22
    if test $result -ne $value; then
19
23
        failed=`expr $failed + 1`
20
24
        echo "Got $result but expected $value"
35
39
    check_invertible $value
36
40
done
37
41
 
38
 
exit `test $failed -gt 0`
 
42
exit $failed