File: chkbuild.sh

package info (click to toggle)
libdbd-informix-perl 2003.04-3
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k, sarge
  • size: 1,232 kB
  • ctags: 467
  • sloc: perl: 7,349; ansic: 5,340; sh: 184; makefile: 58
file content (66 lines) | stat: -rwxr-xr-x 1,353 bytes parent folder | download
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
#!/bin/ksh
#
#	@(#)$Id: chkbuild.sh,v 100.1 2002/02/08 22:49:00 jleffler Exp $
#
#	Test DBD::Informix for compatability with different ESQL/C versions
#
#   Copyright 1996-1999 Jonathan Leffler
#   Copyright 2000      Informix Software
#   Copyright 2002      IBM

: ${PERL:=perl}
: ${MAKE:=make}

if [ ! -f Makefile.PL ]
then ${CO:-co} Makefile.PL
fi

if [ ! -f test.all ]
then ${MAKE} -f /dev/null test.all
fi

case $# in
0)	if [ -z "$DBD_INFORMIX_CONFIG_LIST" ]
	then
		echo 'Specify the environment setting scripts on the command line' 1>&2
		echo 'or in $DBD_INFORMIX_CONFIG_LIST' 1>&2
		exit 1
	fi
	config_list="${DBD_INFORMIX_CONFIG_LIST}";;
*)	config_list="$*";;
esac

for config in $config_list
do
	(
	echo
	date
	echo "Testing DBD::Informix with configuration $config"
	esql_vers=`esql -V | sed -e '2,$d' -e 's/.*Version //' -e 's/\([0-9][0-9]*\)\.\([0-9][0-9]\).*/\1\2/'`
	export ESQLC_VERSION=$esql_vers
	# JLSS command - environ
	environ -a -u -b
	echo
	rm -f esql
	if $PERL Makefile.PL &&
		${MAKE} clean &&
		mv Makefile.old Makefile &&
		( [ ! -f esql.old ] || mv esql.old esql )
		${MAKE} &&
		${MAKE} test &&
		test.all
	then status="PASSED"
	else status="FAILED"
	fi
	echo
	# JLSS command - boxecho
	boxecho "$config -- $status"
	echo
	sleep 2
	if [ -f Makefile ]
	then ${MAKE} -f Makefile realclean
	fi
	rm -f esql.old
	echo
	)
done