diff options
| author | Mateusz Loskot <mateusz@loskot.net> | 2006-10-13 18:46:27 +0000 |
|---|---|---|
| committer | Mateusz Loskot <mateusz@loskot.net> | 2006-10-13 18:46:27 +0000 |
| commit | 6e6090e292713b3ae4bd15bc0fa30bb81ad1bd9c (patch) | |
| tree | 6ad2c8dafc4edae379d3402be01443143ec389a8 | |
| parent | 854433f066e16a2506ed2aebf4e5c649bc1b002e (diff) | |
| download | PROJ-6e6090e292713b3ae4bd15bc0fa30bb81ad1bd9c.tar.gz PROJ-6e6090e292713b3ae4bd15bc0fa30bb81ad1bd9c.zip | |
Added 'make check' target to run tests.
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1355 4e78687f-474d-0410-85f9-8d5e500ac6b2
| -rw-r--r-- | nad/Makefile.am | 22 | ||||
| -rwxr-xr-x | nad/test27 | 27 | ||||
| -rwxr-xr-x | nad/test83 | 26 | ||||
| -rwxr-xr-x | nad/testntv2 | 30 | ||||
| -rwxr-xr-x | nad/testvarious | 27 |
5 files changed, 123 insertions, 9 deletions
diff --git a/nad/Makefile.am b/nad/Makefile.am index 00f65136..bc337a81 100644 --- a/nad/Makefile.am +++ b/nad/Makefile.am @@ -1,3 +1,14 @@ +# Executables paths passed to test scripts +EXEPATH = $(top_srcdir)/src +PROJEXE = $(EXEPATH)/proj +CS2CSEXE = $(EXEPATH)/cs2cs + +# PROJ.4 test scripts +TEST27 = ./test27 +TEST83 = ./test83 +TESTNTV2 = ./testntv2 +TESTVARIOUS = ./testvarious + pkgdata_DATA = GL27 nad.lst nad27 nad83 proj_def.dat world epsg esri \ esri.extra other.extra @@ -28,8 +39,11 @@ install-data-local: fi; \ done +check-local: + $(TEST27) $(PROJEXE) + $(TEST83) $(PROJEXE) + $(TESTNTV2) $(CS2CSEXE) + $(TESTVARIOUS) $(CS2CSEXE) -test: - ./test27 - ./test83 - ./testvarious +clean-local: + $(RM) $(TEST_DB) @@ -1,14 +1,35 @@ : # Script to test most of the SPCS zones. -# # This script generated from execution of NMD's program l176, where # the second pair of numbers are respective easting and northing output. # # Proj will vary in the .001ft range with projections using Transverse # Mercator due to greater precision of meridinal distance function. # +EXE=$1 + +usage() +{ + echo "Usage: ${0} <path to 'proj' program>" + echo + exit 1 +} + +if test -z "${EXE}"; then + echo "*** ERROR: Missing path to 'proj' program." + usage +else + if test ! -x ${EXE}; then + echo "*** ERROR: Can not find '${EXE}' program!" + exit 1 + fi +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + OUT=proj_out27 -EXE=../src/proj INIT_FILE=./nad27 # echo "doing tests into file ${OUT}, please wait" @@ -816,10 +837,12 @@ if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURED" echo "test file ${OUT} saved" + echo exit 100 else echo "TEST OK" echo "test file ${OUT} removed" + echo /bin/rm -f ${OUT} exit 0 fi @@ -7,8 +7,30 @@ # Proj will vary in the .001ft range with projections using Transverse # Mercator due to greater precision of meridinal distance function. # +EXE=$1 + +usage() +{ + echo "Usage: ${0} <path to 'proj' program>" + echo + exit 1 +} + +if test -z "${EXE}"; then + echo "*** ERROR: Missing path to 'proj' program." + usage +else + if test ! -x ${EXE}; then + echo "*** ERROR: Can not find '${EXE}' program!" + exit 1 + fi +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + OUT=proj_out83 -EXE=../src/proj INIT_FILE=./nad83 # echo "doing tests into file ${OUT}, please wait" @@ -696,10 +718,12 @@ if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURED" echo "test file ${OUT} saved" + echo exit 100 else echo "TEST OK" echo "test file ${OUT} removed" + echo /bin/rm -f ${OUT} exit 0 fi diff --git a/nad/testntv2 b/nad/testntv2 index 307f8141..096f4bbb 100755 --- a/nad/testntv2 +++ b/nad/testntv2 @@ -3,8 +3,31 @@ # Test NTv2 (.gsb) support. Assumes ntv2_0.gsb is installed. # # +EXE=$1 + +usage() +{ + echo "Usage: ${0} <path to 'cs2cs' program>" + echo + exit 1 +} + +if test -z "${EXE}"; then + echo "*** ERROR: Missing path to 'cs2cs' program." + usage +else + if test ! -x ${EXE}; then + echo "*** ERROR: Can not find '${EXE}' program!" + exit 1 + fi +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + OUT=ntv2_out -EXE=../src/cs2cs +#EXE=../src/cs2cs # echo "doing tests into file ${OUT}, please wait" rm -f ${OUT} @@ -39,8 +62,13 @@ if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURED" echo "test file ${OUT} saved" + echo + exit 100 else echo "TEST OK" echo "test file ${OUT} removed" + echo /bin/rm -f ${OUT} + exit 0 fi + diff --git a/nad/testvarious b/nad/testvarious index 53d36cc5..29eac6ed 100755 --- a/nad/testvarious +++ b/nad/testvarious @@ -2,8 +2,31 @@ # Script to do some testing of various transformation. # # +EXE=$1 + +usage() +{ + echo "Usage: ${0} <path to 'cs2cs' program>" + echo + exit 1 +} + +if test -z "${EXE}"; then + echo "*** ERROR: Missing path to 'cs2cs' program." + usage +else + if test ! -x ${EXE}; then + echo "*** ERROR: Can not find '${EXE}' program!" + exit 1 + fi +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + OUT=td_out -EXE=../src/cs2cs +#EXE=../src/cs2cs # echo "doing tests into file ${OUT}, please wait" rm -f ${OUT} @@ -150,10 +173,12 @@ if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURED" echo "test file ${OUT} saved" + echo exit 100 else echo "TEST OK" echo "test file ${OUT} removed" + echo /bin/rm -f ${OUT} exit 0 fi |
