mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-25 09:32:46 +00:00
Parametrized test output dir and added Makefile
git-svn-id: http://svn.osgeo.org/postgis/trunk@1478 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
18be19db54
commit
97af7875f7
21
regress/Makefile
Normal file
21
regress/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
TMPDIR?=/tmp
|
||||
|
||||
test: test-common test-index test-lwgeom test-ogc
|
||||
|
||||
test-lwgeom:
|
||||
@./run_lwgeom_regress
|
||||
|
||||
test-common:
|
||||
@./run_regress
|
||||
|
||||
test-index:
|
||||
@./run_index_regress
|
||||
|
||||
test-ogc:
|
||||
@./run_ogc_regress
|
||||
|
||||
clean:
|
||||
rm -f $(TMPDIR)/regress_out
|
||||
rm -f $(TMPDIR)/lwgeom_regress_out
|
||||
rm -f $(TMPDIR)/regress_index_out
|
||||
rm -f $(TMPDIR)/regress_ogc_out
|
|
@ -5,11 +5,15 @@ echo ""
|
|||
echo "Index Creation will take some time..."
|
||||
echo ""
|
||||
|
||||
if [ -z "$TMPDIR" ]; then
|
||||
TMPDIR=/tmp
|
||||
fi
|
||||
|
||||
DB=postgis_reg
|
||||
createdb $DB > /dev/null
|
||||
createlang plpgsql $DB > /dev/null
|
||||
psql -f ../lwpostgis.sql $DB > /dev/null 2>&1
|
||||
psql -tA < regress_index.sql $DB > regress_index_out 2>&1
|
||||
diff regress_index_out regress_index_expected
|
||||
psql -tA < regress_index.sql $DB > "${TMPDIR}/regress_index_out" 2>&1
|
||||
diff regress_index_expected "${TMPDIR}/regress_index_out"
|
||||
sleep 1
|
||||
dropdb $DB > /dev/null
|
||||
|
|
|
@ -3,6 +3,10 @@ echo "Running LWGEOM Regression Test..."
|
|||
echo ""
|
||||
echo "Building a database for testing (postgis_reg)."
|
||||
|
||||
if [ -z "$TMPDIR" ]; then
|
||||
TMPDIR=/tmp
|
||||
fi
|
||||
|
||||
DB=postgis_reg
|
||||
createdb $DB > /dev/null
|
||||
|
||||
|
@ -15,7 +19,7 @@ psql -f ../lwpostgis.sql $DB > /dev/null 2>&1
|
|||
echo "there shouldnt be any real output produced after this line."
|
||||
echo ""
|
||||
|
||||
psql -tA < lwgeom_regress.sql $DB 2>&1 | grep -v "^INSERT" > lwgeom_regress_out
|
||||
diff lwgeom_regress_out lwgeom_regress_expected
|
||||
psql -tA < lwgeom_regress.sql $DB 2>&1 | grep -v "^INSERT" > "${TMPDIR}/lwgeom_regress_out"
|
||||
diff lwgeom_regress_expected "${TMPDIR}/lwgeom_regress_out"
|
||||
sleep 1
|
||||
dropdb $DB > /dev/null
|
||||
|
|
|
@ -4,11 +4,15 @@ echo
|
|||
echo " expected:'<' obtained:'>'"
|
||||
echo
|
||||
|
||||
if [ -z "$TMPDIR" ]; then
|
||||
TMPDIR=/tmp
|
||||
fi
|
||||
|
||||
DB=postgis_reg
|
||||
createdb $DB > /dev/null
|
||||
createlang plpgsql $DB > /dev/null
|
||||
psql -f ../lwpostgis.sql $DB > /dev/null 2>&1
|
||||
psql -tA < regress_ogc.sql $DB 2>&1 | grep -v INSERT > regress_ogc_out
|
||||
diff regress_ogc_expected regress_ogc_out
|
||||
psql -tA < regress_ogc.sql $DB 2>&1 | grep -v INSERT > "${TMPDIR}/regress_ogc_out"
|
||||
diff regress_ogc_expected "${TMPDIR}/regress_ogc_out"
|
||||
sleep 1
|
||||
dropdb $DB > /dev/null
|
||||
|
|
|
@ -4,11 +4,15 @@ echo
|
|||
echo " expected:'<' obtained:'>'"
|
||||
echo
|
||||
|
||||
if [ -z "$TMPDIR" ]; then
|
||||
TMPDIR=/tmp
|
||||
fi
|
||||
|
||||
DB=postgis_reg
|
||||
createdb $DB > /dev/null
|
||||
createlang plpgsql $DB > /dev/null
|
||||
psql -f ../lwpostgis.sql $DB > /dev/null 2>&1
|
||||
psql -tA < regress.sql $DB 2>&1 | grep -v INSERT > regress_out
|
||||
diff regress_expected regress_out
|
||||
psql -tA < regress.sql $DB 2>&1 | grep -v INSERT > "${TMPDIR}/regress_out"
|
||||
diff regress_expected "${TMPDIR}/regress_out"
|
||||
sleep 1
|
||||
dropdb $DB > /dev/null
|
||||
|
|
Loading…
Reference in a new issue