Thu May 10 15:17:54 PDT 2007
- Previous message: [Slony1-commit] slony1-engine postgresql-slony1-engine.spec.in
- Next message: [Slony1-commit] slony1-engine/src/xxid xxid.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/tests/one-offs/updatefunctions
In directory main.slony.info:/tmp/cvs-serv31772
Modified Files:
test-update-functions.sh
Log Message:
Numerous fixes to script that tries to build numerous Slony-I versions
and run INIT CLUSTER (against elder versions) then UPDATE FUNCTIONS
(to bring schema up to date) and compares output of pg_dumps of the
various tables to see how similar the schemas are...
Index: test-update-functions.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/one-offs/updatefunctions/test-update-functions.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test-update-functions.sh 15 Jan 2007 21:38:24 -0000 1.1
--- test-update-functions.sh 10 May 2007 22:17:52 -0000 1.2
***************
*** 16,20 ****
SLONYCLUSTER=${SLONYCLUSTER:-"functest"}
! OURCVSROOT=":pserver:anonymous at gborg.postgresql.org:/usr/local/cvsroot/slony1"
ELDERVERSIONS="
--- 16,20 ----
SLONYCLUSTER=${SLONYCLUSTER:-"functest"}
! OURCVSROOT=":pserver:anonymous at main.slony.info:/slony1"
ELDERVERSIONS="
***************
*** 33,36 ****
--- 33,39 ----
REL_1_1_5
REL_1_1_6
+ REL_1_1_7
+ REL_1_1_8
+ REL_1_1_9
REL_1_2_0
REL_1_2_1
***************
*** 38,88 ****
REL_1_2_5
REL_1_2_6
"
! LATESTVERSION=`echo ${VERSIONS} | sort | tail -1`
# Make sure all versions of Slony-I are present and built
for REL in `echo $VERSIONS | sort`; do
! if [ -e ${SRCHOME}/slony1-engine-${REL} ] ; then
! CHECKOUT=0
! else
! cd ${SRCHOME}
! echo" CVSROOT=\"${OURCVSROOT}\" cvs export -r${REL} slony1-engine"
! CVSROOT="${OURCVSROOT}" cvs export -r${REL} slony1-engine
! mv slony1-engine slony1-engine-${REL}
! cd ${SRCHOME}/slony1-engine-${REL}
! if [ echo ${REL} | egrep 'REL_1_2' ] ; then
! ./configure --with-pgconfigdir=${PGBINDIR}
! fi
! if [ echo ${REL} | egrep 'REL_1_1' ] ; then
! ./configure --with-pgconfigdir=${PGBINDIR} --with-pgbindir=${PGBINDIR} --with-pgincludedir=${PGHOME}/include --with-pgincludeserverdir=${PGHOME}/include/server --with-pglibdir=${PGHOME}/lib --with-pgpkglibdir=${PGHOME}/lib --with-pgsharedir=${PGHOME}/share
! fi
! make
fi
done
! echo <<EOF > $SRCHOME/init-cluster.slonik
cluster name = ${SLONYCLUSTER};
node 1 admin conninfo='host=${PGHOST} dbname=${PGDATABASE} user=${PGUSER} port=${PGPORT}';
! init cluster (id=1, 'test cluster for checking schema');
! EOF
! echo <<EOF > $SRCHOME/update-functions.slonik
cluster name = ${SLONYCLUSTER};
node 1 admin conninfo='host=${PGHOST} dbname=${PGDATABASE} user=${PGUSER} port=${PGPORT}';
update functions (id=1);
! EOF
for rel in `echo $VERSIONS | sort`; do
${PGBINDIR}/dropdb -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} ${PGDATABASE}
${PGBINDIR}/createdb -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} ${PGDATABASE}
${PGBINDIR}/createlang -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} plpgsql ${PGDATABASE}
! cd ${SRCHOME}/slony1-engine-${rel}
make install
${PGBINDIR}/slonik ${SRCHOME}/init-cluster.slonik
! cd ${SRCHOME}/slony1-engine-${LATESTVERSION}
make install
${PGBINDIR}/slonik ${SRCHOME}/update-functions.slonik
mkdir -p $SRCHOME/relschemas
${PGBINDIR}/pg_dump -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} ${PGDATABASE} > $SRCHOME/relschemas/${rel}-to-${LATESTVERSION}.sql
done
--- 41,104 ----
REL_1_2_5
REL_1_2_6
+ REL_1_2_7
+ REL_1_2_8
+ REL_1_2_9
"
! LATESTVERSION=`echo ${VERSIONS} | fmt -w 5 | sort | tail -1`
# Make sure all versions of Slony-I are present and built
for REL in `echo $VERSIONS | sort`; do
! if [ -e ${SRCHOME}/slony1-engine-${REL} ] ; then
! CHECKOUT=0
! else
! echo "Check out repository for version ${REL}"
! cd ${SRCHOME}
! CVSROOT="${OURCVSROOT}" cvs export -r${REL} slony1-engine
! mv slony1-engine slony1-engine-${REL}
fi
+ echo "run autoconf version ${REL}"
+ cd ${SRCHOME}/slony1-engine-${REL}
+ autoconf
+ for i in `echo ${REL} | egrep REL_1_2`; do
+ echo "Build 1.2 release ${REL}"
+ ./configure --with-pgconfigdir=${PGBINDIR}
+ done
+ for i in `echo ${REL} | egrep REL_1_1`; do
+ echo "Build 1.1 release ${REL}"
+ ./configure --with-pgconfigdir=${PGBINDIR} --with-pgbindir=${PGBINDIR} --with-pgincludedir=${PGHOME}/include --with-pgincludeserverdir=${PGHOME}/include/server --with-pglibdir=${PGHOME}/lib --with-pgpkglibdir=${PGHOME}/lib --with-pgsharedir=${PGHOME}/share
+ done
+ make
done
! echo "
cluster name = ${SLONYCLUSTER};
node 1 admin conninfo='host=${PGHOST} dbname=${PGDATABASE} user=${PGUSER} port=${PGPORT}';
! init cluster (id=1, comment='test cluster for checking schema');
! " > $SRCHOME/init-cluster.slonik
! echo "
cluster name = ${SLONYCLUSTER};
node 1 admin conninfo='host=${PGHOST} dbname=${PGDATABASE} user=${PGUSER} port=${PGPORT}';
update functions (id=1);
! " > $SRCHOME/update-functions.slonik
for rel in `echo $VERSIONS | sort`; do
+ echo "Prepare databases for ${rel}"
${PGBINDIR}/dropdb -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} ${PGDATABASE}
${PGBINDIR}/createdb -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} ${PGDATABASE}
${PGBINDIR}/createlang -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} plpgsql ${PGDATABASE}
! echo "Install Slony-I version ${rel}"
! cd ${SRCHOME}/slony1-engine-${rel}/src
make install
+ echo "Initialize Slony-I cluster based on release ${rel}"
${PGBINDIR}/slonik ${SRCHOME}/init-cluster.slonik
! echo "Install Slony-I version ${LATESTVERSION}"
! cd ${SRCHOME}/slony1-engine-${LATESTVERSION}/src
make install
+ echo "Update cluster to ${LATESTVERSION}"
${PGBINDIR}/slonik ${SRCHOME}/update-functions.slonik
mkdir -p $SRCHOME/relschemas
+ echo "Dump ${rel}-to-${LATESTVERSION} schema"
${PGBINDIR}/pg_dump -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} ${PGDATABASE} > $SRCHOME/relschemas/${rel}-to-${LATESTVERSION}.sql
done
- Previous message: [Slony1-commit] slony1-engine postgresql-slony1-engine.spec.in
- Next message: [Slony1-commit] slony1-engine/src/xxid xxid.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list