diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-09-19 12:50:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-19 12:50:16 +0200 |
| commit | 4ea0c2d72c80120a6074b97577a2659e23015f5c (patch) | |
| tree | fababdffc9751602fab1930f2b6413f424667977 | |
| parent | 722b2a4ea7ea329fabea4dd92ca1b2c60799f0d7 (diff) | |
| parent | eb2862c80971f106c69bfb46e8324104634fe1f2 (diff) | |
| download | PROJ-4ea0c2d72c80120a6074b97577a2659e23015f5c.tar.gz PROJ-4ea0c2d72c80120a6074b97577a2659e23015f5c.zip | |
Merge pull request #1125 from rouault/rename_nad_as_data
Rename nad/ as data/ and move nad/test* to test/old/*
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | Makefile.am | 2 | ||||
| -rw-r--r-- | appveyor.yml | 4 | ||||
| -rw-r--r-- | cmake/ProjTest.cmake | 6 | ||||
| -rw-r--r-- | configure.ac | 6 | ||||
| -rw-r--r-- | data/CH (renamed from nad/CH) | 0 | ||||
| -rw-r--r-- | data/CMakeLists.txt (renamed from nad/CMakeLists.txt) | 13 | ||||
| -rw-r--r-- | data/GL27 (renamed from nad/GL27) | 0 | ||||
| -rw-r--r-- | data/IGNF (renamed from nad/IGNF) | 0 | ||||
| -rw-r--r-- | data/ITRF2000 (renamed from nad/ITRF2000) | 0 | ||||
| -rw-r--r-- | data/ITRF2008 (renamed from nad/ITRF2008) | 0 | ||||
| -rw-r--r-- | data/ITRF2014 (renamed from nad/ITRF2014) | 0 | ||||
| -rw-r--r-- | data/Makefile.am | 47 | ||||
| -rw-r--r-- | data/README (renamed from nad/README) | 0 | ||||
| -rw-r--r-- | data/epsg (renamed from nad/epsg) | 0 | ||||
| -rw-r--r-- | data/epsg-deprecated (renamed from nad/epsg-deprecated) | 0 | ||||
| -rw-r--r-- | data/esri (renamed from nad/esri) | 0 | ||||
| -rw-r--r-- | data/esri.extra (renamed from nad/esri.extra) | 0 | ||||
| -rwxr-xr-x | data/install.in (renamed from nad/install.in) | 0 | ||||
| -rw-r--r-- | data/makefile.vc (renamed from nad/makefile.vc) | 0 | ||||
| -rw-r--r-- | data/nad.lst (renamed from nad/nad.lst) | 0 | ||||
| -rw-r--r-- | data/nad27 (renamed from nad/nad27) | 0 | ||||
| -rw-r--r-- | data/nad83 (renamed from nad/nad83) | 0 | ||||
| -rw-r--r-- | data/null.lla (renamed from nad/null.lla) | 0 | ||||
| -rw-r--r-- | data/other.extra (renamed from nad/other.extra) | 0 | ||||
| -rw-r--r-- | data/proj_def.dat (renamed from nad/proj_def.dat) | 0 | ||||
| -rw-r--r-- | data/proj_outIGNF.dist-real (renamed from nad/proj_outIGNF.dist-real) | 0 | ||||
| -rw-r--r-- | data/tests/test_nodata.gtx (renamed from nad/tests/test_nodata.gtx) | bin | 104 -> 104 bytes | |||
| -rw-r--r-- | data/world (renamed from nad/world) | 0 | ||||
| -rw-r--r-- | makefile.vc | 6 | ||||
| -rw-r--r-- | nad/Makefile.am | 92 | ||||
| -rw-r--r-- | nmake.opt | 4 | ||||
| -rw-r--r-- | src/makefile.vc | 2 | ||||
| -rw-r--r-- | test/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | test/Makefile.am | 2 | ||||
| -rw-r--r-- | test/fuzzers/README.TXT | 2 | ||||
| -rwxr-xr-x | test/fuzzers/build_seed_corpus.sh | 2 | ||||
| -rw-r--r-- | test/gie/Makefile.am | 2 | ||||
| -rw-r--r-- | test/gie/more_builtins.gie | 2 | ||||
| -rw-r--r-- | test/gigs/Makefile.am | 2 | ||||
| -rw-r--r-- | test/old/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | test/old/Makefile.am | 35 | ||||
| -rw-r--r-- | test/old/ntv2_out.dist (renamed from nad/ntv2_out.dist) | 0 | ||||
| -rw-r--r-- | test/old/pj_out27.dist (renamed from nad/pj_out27.dist) | 0 | ||||
| -rw-r--r-- | test/old/pj_out83.dist (renamed from nad/pj_out83.dist) | 0 | ||||
| -rw-r--r-- | test/old/proj_outIGNF.dist (renamed from nad/proj_outIGNF.dist) | 0 | ||||
| -rw-r--r-- | test/old/td_out.dist (renamed from nad/td_out.dist) | 0 | ||||
| -rwxr-xr-x | test/old/test27 (renamed from nad/test27) | 9 | ||||
| -rwxr-xr-x | test/old/test83 (renamed from nad/test83) | 9 | ||||
| -rwxr-xr-x | test/old/testIGNF (renamed from nad/testIGNF) | 24 | ||||
| -rwxr-xr-x | test/old/testdatumfile (renamed from nad/testdatumfile) | 9 | ||||
| -rwxr-xr-x | test/old/testflaky (renamed from nad/testflaky) | 7 | ||||
| -rwxr-xr-x | test/old/testntv2 (renamed from nad/testntv2) | 7 | ||||
| -rwxr-xr-x | test/old/testvarious (renamed from nad/testvarious) | 13 | ||||
| -rw-r--r-- | test/old/tf_out.dist (renamed from nad/tf_out.dist) | 0 | ||||
| -rw-r--r-- | test/old/tv_out.dist (renamed from nad/tv_out.dist) | 0 | ||||
| -rwxr-xr-x | travis/install.sh | 14 | ||||
| -rwxr-xr-x | travis/mingw32/install.sh | 8 |
58 files changed, 181 insertions, 163 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 04297fa0..69e93deb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,7 @@ set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}" CACHE PATH "The directory to install cm include_directories(${PROJ4_SOURCE_DIR}/src) message(STATUS "") -add_subdirectory(nad) +add_subdirectory(data) add_subdirectory(src) add_subdirectory(man) add_subdirectory(cmake) diff --git a/Makefile.am b/Makefile.am index 39a1201b..9e5787e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src man nad jniwrap cmake test +SUBDIRS = src man data jniwrap cmake test EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt CITATION diff --git a/appveyor.yml b/appveyor.yml index ec08f20c..1fdc27ca 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -49,10 +49,10 @@ build_script: test_script: - echo test_script - - if "%BUILD_TYPE%" == "cmake" set PROJ_LIB=C:\projects\proj-4\nad + - if "%BUILD_TYPE%" == "cmake" set PROJ_LIB=C:\projects\proj-4\data - if "%BUILD_TYPE%" == "nmake" set PROJ_LIB=C:\PROJ\SHARE - if "%BUILD_TYPE%" == "nmake" mkdir %PROJ_LIB%\tests - - if "%BUILD_TYPE%" == "nmake" copy nad\tests\*.* %PROJ_LIB%\tests + - if "%BUILD_TYPE%" == "nmake" copy data\tests\*.* %PROJ_LIB%\tests - set CURDIR=%CD% - cd %PROJ_LIB% - curl -O http://download.osgeo.org/proj/proj-datumgrid-1.7.zip diff --git a/cmake/ProjTest.cmake b/cmake/ProjTest.cmake index ec56afd2..9d886f5e 100644 --- a/cmake/ProjTest.cmake +++ b/cmake/ProjTest.cmake @@ -9,7 +9,7 @@ function(proj_add_test_script_sh SH_NAME BIN_USE) set(TEST_OK 1) if(ARGV2) set(TEST_OK 0) - set(GRID_FULLNAME ${PROJECT_SOURCE_DIR}/nad/${ARGV2}) + set(GRID_FULLNAME ${PROJECT_SOURCE_DIR}/data/${ARGV2}) if(EXISTS ${GRID_FULLNAME}) set(TEST_OK 1) endif(EXISTS ${GRID_FULLNAME}) @@ -22,8 +22,8 @@ function(proj_add_test_script_sh SH_NAME BIN_USE) if(${TEST_OK}) add_test( NAME "${testname}" - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/nad - COMMAND ${PROJECT_SOURCE_DIR}/nad/${SH_NAME} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/data + COMMAND ${PROJECT_SOURCE_DIR}/test/old/${SH_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}} ) endif(${TEST_OK}) diff --git a/configure.ac b/configure.ac index 808e5791..a8747838 100644 --- a/configure.ac +++ b/configure.ac @@ -264,15 +264,15 @@ AC_SUBST(MUTEX_SETTING,$MUTEX_SETTING) AC_SUBST(THREAD_LIB,$THREAD_LIB) AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile - test/Makefile test/gie/Makefile test/gigs/Makefile test/unit/Makefile + test/Makefile test/old/Makefile test/gie/Makefile test/gigs/Makefile test/unit/Makefile test/googletest/Makefile test/googletest/include/Makefile test/googletest/include/gtest/Makefile test/googletest/include/gtest/internal/Makefile test/googletest/include/gtest/internal/custom/Makefile test/googletest/src/Makefile - man/Makefile man/man1/Makefile man/man3/Makefile nad/Makefile + man/Makefile man/man1/Makefile man/man3/Makefile data/Makefile jniwrap/Makefile jniwrap/org.osgeo.proj/Makefile jniwrap/org.osgeo.proj/org/Makefile jniwrap/org.osgeo.proj/org/proj4/Makefile]) -AC_CONFIG_FILES([nad/install], [chmod +x nad/install]) +AC_CONFIG_FILES([data/install], [chmod +x data/install]) AC_CONFIG_FILES([proj.pc]) diff --git a/nad/CMakeLists.txt b/data/CMakeLists.txt index 904066f4..82927b8b 100644 --- a/nad/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -48,16 +48,3 @@ set(ALL_DATA_FILE ${PROJ_DICTIONARY} ${GEOID_FILES}) install(FILES ${ALL_DATA_FILE} DESTINATION ${DATADIR}) - -# -# test -# -set(CS2CS_BIN "cs2cs") -set(PROJ_BIN "proj") -proj_add_test_script_sh("test27" PROJ_BIN ) -proj_add_test_script_sh("test83" PROJ_BIN ) -proj_add_test_script_sh("testvarious" CS2CS_BIN ) -proj_add_test_script_sh("testdatumfile" CS2CS_BIN "connu") -proj_add_test_script_sh("testIGNF" CS2CS_BIN "ntf_r93.gsb") -proj_add_test_script_sh("testntv2" CS2CS_BIN "ntv2_0.gsb") - diff --git a/nad/ITRF2000 b/data/ITRF2000 index a7064f3b..a7064f3b 100644 --- a/nad/ITRF2000 +++ b/data/ITRF2000 diff --git a/nad/ITRF2008 b/data/ITRF2008 index 7441bbfd..7441bbfd 100644 --- a/nad/ITRF2008 +++ b/data/ITRF2008 diff --git a/nad/ITRF2014 b/data/ITRF2014 index 557ce60a..557ce60a 100644 --- a/nad/ITRF2014 +++ b/data/ITRF2014 diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 00000000..f85a5ddb --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,47 @@ +DATAPATH = $(top_srcdir)/data + +pkgdata_DATA = GL27 nad.lst proj_def.dat nad27 nad83 world epsg esri \ + esri.extra other.extra \ + CH IGNF \ + ITRF2000 ITRF2008 ITRF2014 + +EXTRA_DIST = GL27 nad.lst proj_def.dat nad27 nad83 \ + world epsg esri \ + esri.extra other.extra \ + CH IGNF \ + ITRF2000 ITRF2008 ITRF2014 \ + makefile.vc CMakeLists.txt tests/test_nodata.gtx null.lla + +process-nad2bin: + @if [ -f $(DATAPATH)/null.lla -a ! -f null ] || [ -f $(DATAPATH)/conus.lla -a ! -f conus ] ; then \ + for x in $(DATAPATH)/*.lla ; do \ + DEST=`basename $$x .lla`; \ + echo "../src/nad2bin$(EXEEXT) $$DEST < $$x"; \ + ../src/nad2bin$(EXEEXT) $$DEST < $$x ; \ + done; \ + fi + +install-data-local: process-nad2bin + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) + @if [ -f $(DATAPATH)/null.lla -a ! -f $(DATAPATH)/null ] || [ -f $(DATAPATH)/conus.lla -a ! -f $(DATAPATH)/conus ] ; then \ + for x in $(DATAPATH)/*.lla ; do \ + DEST=$(DESTDIR)$(pkgdatadir)/`basename $$x .lla`; \ + echo "../src/nad2bin$(EXEEXT) $$DEST < $$x"; \ + ../src/nad2bin$(EXEEXT) $$DEST < $$x ; \ + if [ $$? -ne 0 ] ; then \ + echo "nad2bin$(EXEEXT) failed to install $$DEST"; \ + exit 1; \ + fi; \ + done; \ + else \ + echo "nad2nad NADCON source files not present"; \ + fi + @for gridfile in $(DATAPATH)/*.gsb $(DATAPATH)/*.gtx $(DATAPATH)/ntv1_can.dat dummy \ + $(DATAPATH)/alaska $(DATAPATH)/conus $(DATAPATH)/hawaii $(DATAPATH)/null \ + $(DATAPATH)/prvi $(DATAPATH)/stgeorge $(DATAPATH)/stlrnc $(DATAPATH)/stpaul \ + $(DATAPATH)/FL $(DATAPATH)/MD $(DATAPATH)/TN $(DATAPATH)/WI $(DATAPATH)/WO; do \ + if test "$$gridfile" != "dummy" -a -f "$$gridfile" ; then \ + echo $(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/`basename $$gridfile`; \ + $(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/`basename $$gridfile`; \ + fi; \ + done diff --git a/nad/README b/data/README index 886e345b..886e345b 100644 --- a/nad/README +++ b/data/README diff --git a/nad/epsg-deprecated b/data/epsg-deprecated index 2b5e9fa8..2b5e9fa8 100644 --- a/nad/epsg-deprecated +++ b/data/epsg-deprecated diff --git a/nad/esri.extra b/data/esri.extra index 611dd660..611dd660 100644 --- a/nad/esri.extra +++ b/data/esri.extra diff --git a/nad/install.in b/data/install.in index d60dc725..d60dc725 100755 --- a/nad/install.in +++ b/data/install.in diff --git a/nad/makefile.vc b/data/makefile.vc index e235e8d8..e235e8d8 100644 --- a/nad/makefile.vc +++ b/data/makefile.vc diff --git a/nad/nad.lst b/data/nad.lst index cc427722..cc427722 100644 --- a/nad/nad.lst +++ b/data/nad.lst diff --git a/nad/null.lla b/data/null.lla index eb25285a..eb25285a 100644 --- a/nad/null.lla +++ b/data/null.lla diff --git a/nad/other.extra b/data/other.extra index 4b5797e9..4b5797e9 100644 --- a/nad/other.extra +++ b/data/other.extra diff --git a/nad/proj_def.dat b/data/proj_def.dat index 00dff281..00dff281 100644 --- a/nad/proj_def.dat +++ b/data/proj_def.dat diff --git a/nad/proj_outIGNF.dist-real b/data/proj_outIGNF.dist-real index ad80c0d3..ad80c0d3 100644 --- a/nad/proj_outIGNF.dist-real +++ b/data/proj_outIGNF.dist-real diff --git a/nad/tests/test_nodata.gtx b/data/tests/test_nodata.gtx Binary files differindex e439e5f4..e439e5f4 100644 --- a/nad/tests/test_nodata.gtx +++ b/data/tests/test_nodata.gtx diff --git a/makefile.vc b/makefile.vc index 6c9bb58f..d4fb12bd 100644 --- a/makefile.vc +++ b/makefile.vc @@ -10,21 +10,21 @@ RM = -del default: cd src $(MAKE) /f makefile.vc - cd ..\nad + cd ..\data $(MAKE) /f makefile.vc cd .. clean: cd src $(MAKE) /f makefile.vc clean - cd ..\nad + cd ..\data $(MAKE) /f makefile.vc clean cd .. install-all: cd src $(MAKE) /f makefile.vc install - cd ..\nad + cd ..\data $(MAKE) /f makefile.vc install-all cd .. diff --git a/nad/Makefile.am b/nad/Makefile.am deleted file mode 100644 index 1f3dce7d..00000000 --- a/nad/Makefile.am +++ /dev/null @@ -1,92 +0,0 @@ -# Executables paths passed to test scripts -NADPATH = $(top_srcdir)/nad -EXEPATH = ../src -PROJEXE = $(EXEPATH)/proj -CS2CSEXE = $(EXEPATH)/cs2cs - -# PROJ.4 test scripts -TEST27 = $(NADPATH)/test27 -TEST83 = $(NADPATH)/test83 -TESTNTV2 = $(NADPATH)/testntv2 -TESTVARIOUS = $(NADPATH)/testvarious -TESTFLAKY = $(NADPATH)/testflaky -TESTDATUMFILE = $(NADPATH)/testdatumfile -TESTIGN = $(NADPATH)/testIGNF - -pkgdata_DATA = GL27 nad.lst proj_def.dat nad27 nad83 world epsg esri \ - esri.extra other.extra \ - CH IGNF \ - ITRF2000 ITRF2008 ITRF2014 - -EXTRA_DIST = GL27 nad.lst proj_def.dat nad27 nad83 pj_out27.dist pj_out83.dist td_out.dist \ - test27 test83 world epsg esri tv_out.dist tf_out.dist \ - testflaky testvarious testdatumfile testntv2 ntv2_out.dist \ - esri.extra other.extra \ - CH IGNF testIGNF proj_outIGNF.dist \ - ITRF2000 ITRF2008 ITRF2014 \ - makefile.vc CMakeLists.txt tests/test_nodata.gtx null.lla - -process-nad2bin: - @if [ -f $(NADPATH)/null.lla -a ! -f null ] || [ -f $(NADPATH)/conus.lla -a ! -f conus ] ; then \ - for x in $(NADPATH)/*.lla ; do \ - DEST=`basename $$x .lla`; \ - echo "../src/nad2bin$(EXEEXT) $$DEST < $$x"; \ - ../src/nad2bin$(EXEEXT) $$DEST < $$x ; \ - done; \ - fi - -install-data-local: process-nad2bin - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) - @if [ -f $(NADPATH)/null.lla -a ! -f $(NADPATH)/null ] || [ -f $(NADPATH)/conus.lla -a ! -f $(NADPATH)/conus ] ; then \ - for x in $(NADPATH)/*.lla ; do \ - DEST=$(DESTDIR)$(pkgdatadir)/`basename $$x .lla`; \ - echo "../src/nad2bin$(EXEEXT) $$DEST < $$x"; \ - ../src/nad2bin$(EXEEXT) $$DEST < $$x ; \ - if [ $$? -ne 0 ] ; then \ - echo "nad2bin$(EXEEXT) failed to install $$DEST"; \ - exit 1; \ - fi; \ - done; \ - else \ - echo "nad2nad NADCON source files not present"; \ - fi - @for gridfile in $(NADPATH)/*.gsb $(NADPATH)/*.gtx $(NADPATH)/ntv1_can.dat dummy \ - $(NADPATH)/alaska $(NADPATH)/conus $(NADPATH)/hawaii $(NADPATH)/null \ - $(NADPATH)/prvi $(NADPATH)/stgeorge $(NADPATH)/stlrnc $(NADPATH)/stpaul \ - $(NADPATH)/FL $(NADPATH)/MD $(NADPATH)/TN $(NADPATH)/WI $(NADPATH)/WO; do \ - if test "$$gridfile" != "dummy" -a -f "$$gridfile" ; then \ - echo $(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/`basename $$gridfile`; \ - $(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/`basename $$gridfile`; \ - fi; \ - done - -check-local: process-nad2bin -# Check if we are doing an out-of-tree build - @if test ! -f epsg; then \ - for gridfile in $(NADPATH)/*.gsb $(NADPATH)/*.gtx $(NADPATH)/ntv1_can.dat dummy ; do \ - if test "$$gridfile" != "dummy" -a -f "$$gridfile" ; then \ - cp $$gridfile .; \ - fi; \ - done; \ - for gridfile in $(pkgdata_DATA); do \ - cp $(NADPATH)/$$gridfile .; \ - done; \ - fi - $(TEST27) $(PROJEXE) - $(TEST83) $(PROJEXE) - PROJ_LIB=. $(TESTVARIOUS) $(CS2CSEXE) - @if [ -f conus ] ; then \ - export PROJ_LIB=. ; \ - $(TESTDATUMFILE) $(CS2CSEXE) ; \ - fi - @if [ -f ntf_r93.gsb ] ; then \ - export PROJ_LIB=. ; \ - $(TESTIGN) $(CS2CSEXE) ; \ - fi - @if [ -f ntv2_0.gsb ] ; then \ - export PROJ_LIB=. ; \ - $(TESTNTV2) $(CS2CSEXE) ; \ - fi - -clean-local: - $(RM) $(TEST_DB) @@ -8,10 +8,10 @@ INSTDIR=C:\PROJ !ENDIF # Set the following to the directory where the PROJ distribution data files -# (ie, the contents of ..\NAD) are to be installed. It is possible to later +# (ie, the contents of ..\data) are to be installed. It is possible to later # move the data files to another directory, and define the PROJ_LIB # environment variable to point to that directory. It is also possible to -# have PROJ_LIB name the original NAD directory of the unpacked PROJ +# have PROJ_LIB name the original data directory of the unpacked PROJ # distribution. Any setting of the PROJ_LIB environment variable takes # precedence at runtime over the setting of the PROJ_LIB_DIR macro stored in # the compiled software. diff --git a/src/makefile.vc b/src/makefile.vc index d86649dd..cf9d878c 100644 --- a/src/makefile.vc +++ b/src/makefile.vc @@ -129,7 +129,7 @@ $(MULTISTRESSTEST_EXE): $(MULTISTRESSTEST_OBJ) if exist $(MULTISTRESSTEST_EXE).manifest mt -manifest $(MULTISTRESSTEST_EXE).manifest -outputresource:$(MULTISTRESSTEST_EXE);1 nadshift: nad2bin.exe - cd ..\nad + cd ..\data ..\src\nad2bin.exe < conus.lla conus ..\src\nad2bin.exe < MD.lla MD ..\src\nad2bin.exe < TN.lla TN diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ed44f8a2..ae3d6bf4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -52,4 +52,5 @@ proj_add_gie_test("GIGS-5208" "gigs/5208.gie") # ${TEST_MAIN_SRC} # ${CATCH2_INCLUDE} ) +add_subdirectory(old) add_subdirectory(unit) diff --git a/test/Makefile.am b/test/Makefile.am index 8ea641b9..428e1650 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,4 +7,4 @@ EXTRA_DIST = CMakeLists.txt # libtestmain_la_LDFLAGS = -no-undefined # libtestmain_la_SOURCES = test_main.cpp -SUBDIRS = googletest . gie gigs unit +SUBDIRS = old googletest . gie gigs unit diff --git a/test/fuzzers/README.TXT b/test/fuzzers/README.TXT index a5f8f3ea..812633f0 100644 --- a/test/fuzzers/README.TXT +++ b/test/fuzzers/README.TXT @@ -13,7 +13,7 @@ https://bugs.chromium.org/p/oss-fuzz/issues/list?q=proj4 $ g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -DSTANDALONE ../../src/.libs/libproj.a -lpthread -I../../src Run it: - $ PROJ_LIB=../../nad ./standard_fuzzer {file_generated_by_oss_fuzz} + $ PROJ_LIB=../../data ./standard_fuzzer {file_generated_by_oss_fuzz} - Run locally OSS Fuzz: $ git clone https://github.com/google/oss-fuzz.git diff --git a/test/fuzzers/build_seed_corpus.sh b/test/fuzzers/build_seed_corpus.sh index d85465d3..cdd3cfc3 100755 --- a/test/fuzzers/build_seed_corpus.sh +++ b/test/fuzzers/build_seed_corpus.sh @@ -9,4 +9,4 @@ fi SRC_DIR=$(dirname $0)/../.. -cp -r $SRC_DIR/nad/* $OUT +cp -r $SRC_DIR/data/* $OUT diff --git a/test/gie/Makefile.am b/test/gie/Makefile.am index 102f5a12..7dc32eba 100644 --- a/test/gie/Makefile.am +++ b/test/gie/Makefile.am @@ -11,7 +11,7 @@ EXTRA_DIST = 4D-API_cs2cs-style.gie \ unitconvert.gie \ DHDN_ETRS89.gie -PROJ_LIB ?= $(top_srcdir)/nad +PROJ_LIB ?= $(top_srcdir)/data 4D-API-cs2cs-style: 4D-API_cs2cs-style.gie PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index fd1ff10f..96212cba 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -11,7 +11,7 @@ intends to exercise corner cases. <gie> ------------------------------------------------------------------------------- -Two ob_tran tests from nad/testvarious +Two ob_tran tests from data/testvarious ------------------------------------------------------------------------------- operation +proj=ob_tran +o_proj=moll +R=6378137.0 +o_lon_p=0 +o_lat_p=0 +lon_0=180 ------------------------------------------------------------------------------- diff --git a/test/gigs/Makefile.am b/test/gigs/Makefile.am index 25f7d141..f53825bd 100644 --- a/test/gigs/Makefile.am +++ b/test/gigs/Makefile.am @@ -20,7 +20,7 @@ EXTRA_DIST = \ 5201.gie \ 5208.gie -PROJ_LIB ?= $(top_srcdir)/nad +PROJ_LIB ?= $(top_srcdir)/data 5101.1: 5101.1-jhs.gie PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< diff --git a/test/old/CMakeLists.txt b/test/old/CMakeLists.txt new file mode 100644 index 00000000..d197b2aa --- /dev/null +++ b/test/old/CMakeLists.txt @@ -0,0 +1,12 @@ +# +# test +# +set(CS2CS_BIN "cs2cs") +set(PROJ_BIN "proj") +proj_add_test_script_sh("test27" PROJ_BIN ) +proj_add_test_script_sh("test83" PROJ_BIN ) +proj_add_test_script_sh("testvarious" CS2CS_BIN ) +proj_add_test_script_sh("testdatumfile" CS2CS_BIN "connu") +proj_add_test_script_sh("testIGNF" CS2CS_BIN "ntf_r93.gsb") +proj_add_test_script_sh("testntv2" CS2CS_BIN "ntv2_0.gsb") + diff --git a/test/old/Makefile.am b/test/old/Makefile.am new file mode 100644 index 00000000..9e659280 --- /dev/null +++ b/test/old/Makefile.am @@ -0,0 +1,35 @@ +# Executables paths passed to test scripts +DATAPATH = $(top_srcdir)/data +THIS_DIR = $(top_srcdir)/test/old +EXEPATH = ../../src +PROJEXE = $(EXEPATH)/proj +CS2CSEXE = $(EXEPATH)/cs2cs + +# PROJ.4 test scripts +TEST27 = $(THIS_DIR)/test27 +TEST83 = $(THIS_DIR)/test83 +TESTNTV2 = $(THIS_DIR)/testntv2 +TESTVARIOUS = $(THIS_DIR)/testvarious +TESTFLAKY = $(THIS_DIR)/testflaky +TESTDATUMFILE = $(THIS_DIR)/testdatumfile +TESTIGN = $(THIS_DIR)/testIGNF + +EXTRA_DIST = pj_out27.dist pj_out83.dist td_out.dist \ + test27 test83 tv_out.dist tf_out.dist \ + testflaky testvarious testdatumfile testntv2 ntv2_out.dist \ + testIGNF proj_outIGNF.dist \ + CMakeLists.txt + +check-local: + $(TEST27) $(PROJEXE) + $(TEST83) $(PROJEXE) + PROJ_LIB=$(DATAPATH) $(TESTVARIOUS) $(CS2CSEXE) + @if [ -f $(DATAPATH)/conus ] ; then \ + PROJ_LIB=$(DATAPATH) $(TESTDATUMFILE) $(CS2CSEXE) ; \ + fi + @if [ -f $(DATAPATH)/ntf_r93.gsb ] ; then \ + PROJ_LIB=$(DATAPATH) $(TESTIGN) $(CS2CSEXE) ; \ + fi + @if [ -f $(DATAPATH)/ntv2_0.gsb ] ; then \ + PROJ_LIB=$(DATAPATH) $(TESTNTV2) $(CS2CSEXE) ; \ + fi diff --git a/nad/ntv2_out.dist b/test/old/ntv2_out.dist index 5ce26e6e..5ce26e6e 100644 --- a/nad/ntv2_out.dist +++ b/test/old/ntv2_out.dist diff --git a/nad/pj_out27.dist b/test/old/pj_out27.dist index 632dfc62..632dfc62 100644 --- a/nad/pj_out27.dist +++ b/test/old/pj_out27.dist diff --git a/nad/pj_out83.dist b/test/old/pj_out83.dist index 726140f3..726140f3 100644 --- a/nad/pj_out83.dist +++ b/test/old/pj_out83.dist diff --git a/nad/proj_outIGNF.dist b/test/old/proj_outIGNF.dist index 45112f60..45112f60 100644 --- a/nad/proj_outIGNF.dist +++ b/test/old/proj_outIGNF.dist diff --git a/nad/td_out.dist b/test/old/td_out.dist index 060d14d2..060d14d2 100644 --- a/nad/td_out.dist +++ b/test/old/td_out.dist diff --git a/nad/test27 b/test/old/test27 index e154a0d6..3b62855a 100755 --- a/nad/test27 +++ b/test/old/test27 @@ -6,7 +6,8 @@ # Proj will vary in the .001ft range with projections using Transverse # Mercator due to greater precision of meridional distance function. # -NAD_DIR=`dirname $0` +TEST_OLD_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -17,7 +18,7 @@ usage() } if test -z "${EXE}"; then - EXE=../src/cs2cs + EXE=../../src/cs2cs fi if test ! -x ${EXE}; then @@ -30,7 +31,7 @@ echo "Running ${0} using ${EXE}:" echo "============================================" OUT=proj_out27 -INIT_FILE=${NAD_DIR}/nad27 +INIT_FILE=${DATA_DIR}/nad27 # echo "doing tests into file ${OUT}, please wait" # @@ -832,7 +833,7 @@ EOF # # do 'diff' with distribution results echo "diff ${OUT} with pj_out27.dist" -diff -b ${OUT} ${NAD_DIR}/pj_out27.dist +diff -b ${OUT} ${TEST_OLD_DIR}/pj_out27.dist if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURRED" diff --git a/nad/test83 b/test/old/test83 index c025938b..02f99d5f 100755 --- a/nad/test83 +++ b/test/old/test83 @@ -7,7 +7,8 @@ # Proj will vary in the .001ft range with projections using Transverse # Mercator due to greater precision of meridional distance function. # -NAD_DIR=`dirname $0` +TEST_OLD_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -18,7 +19,7 @@ usage() } if test -z "${EXE}"; then - EXE=../src/cs2cs + EXE=../../src/cs2cs fi if test ! -x ${EXE}; then @@ -31,7 +32,7 @@ echo "Running ${0} using ${EXE}:" echo "============================================" OUT=proj_out83 -INIT_FILE=${NAD_DIR}/nad83 +INIT_FILE=${DATA_DIR}/nad83 # echo "doing tests into file ${OUT}, please wait" # @@ -713,7 +714,7 @@ EOF # # do 'diff' with distribution results echo "diff ${OUT} with pj_out83.dist" -diff -b ${OUT} ${NAD_DIR}/pj_out83.dist +diff -b ${OUT} ${TEST_OLD_DIR}/pj_out83.dist if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURRED" diff --git a/nad/testIGNF b/test/old/testIGNF index 0249b432..f785641e 100755 --- a/nad/testIGNF +++ b/test/old/testIGNF @@ -10,7 +10,9 @@ # transformations will be wrong and vice-versa # 2009-10-04 : addition of NTFG to RGF93G test to check if # the gsb grid is still ok -NAD_DIR=`dirname $0` + +TEST_OLD_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -21,7 +23,7 @@ usage() } if test -z "${EXE}"; then - EXE=../src/cs2cs + EXE=../../src/cs2cs fi if test ! -x ${EXE}; then @@ -29,11 +31,22 @@ if test ! -x ${EXE}; then exit 1 fi +if test -z "${PROJ_LIB}"; then + export PROJ_LIB=${DATA_DIR} +fi + echo "============================================" echo "Running ${0} using ${EXE}:" echo "============================================" OUT=proj_outIGNF + +REMOVE_IGNF=NO +if test ! -f IGNF; then + cp ${PROJ_LIB}/IGNF . + REMOVE_IGNF=YES +fi + INIT_FILE=./IGNF RES="-f %.3f" # @@ -148,10 +161,15 @@ echo "+init=${INIT_FILE}:RGR92 +to +init=${INIT_FILE}:REUN47" >>${OUT} $EXE +init=${INIT_FILE}:RGR92 +to +init=${INIT_FILE}:REUN47 -E $RES >>${OUT} <<EOF 3356123.5400 1303218.3090 5247430.6050 EOF + +if test "${REMOVE_IGNF}" = "YES"; then + rm ./IGNF +fi + # # do 'diff' with distribution results echo "diff ${OUT} with ${OUT}.dist" -diff -b ${OUT} ${NAD_DIR}/${OUT}.dist +diff -b ${OUT} ${TEST_OLD_DIR}/${OUT}.dist if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURRED" diff --git a/nad/testdatumfile b/test/old/testdatumfile index 7106bd47..6cd25b76 100755 --- a/nad/testdatumfile +++ b/test/old/testdatumfile @@ -3,7 +3,8 @@ # files that are not always available. # # -NAD_DIR=`dirname $0` +TEST_OLD_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -14,7 +15,7 @@ usage() } if test -z "${EXE}"; then - EXE=../src/cs2cs + EXE=../../src/cs2cs fi if test ! -x ${EXE}; then @@ -95,10 +96,10 @@ $EXE +proj=latlong +datum=WGS84 \ EOF # ############################################################################## -# Done! +# Done! # do 'diff' with distribution results echo "diff ${OUT} with ${OUT}.dist" -diff -b ${OUT} ${NAD_DIR}/${OUT}.dist +diff -b ${OUT} ${TEST_OLD_DIR}/${OUT}.dist if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURRED" diff --git a/nad/testflaky b/test/old/testflaky index 970d8320..ccb9dfd5 100755 --- a/nad/testflaky +++ b/test/old/testflaky @@ -3,7 +3,8 @@ # on datum files. # # -NAD_DIR=`dirname $0` +TEST_OLD_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -14,7 +15,7 @@ usage() } if test -z "${EXE}"; then - EXE=../src/cs2cs + EXE=../../src/cs2cs fi if test ! -x ${EXE}; then @@ -58,7 +59,7 @@ EOF # Done! # do 'diff' with distribution results echo "diff ${OUT} with ${OUT}.dist" -diff -b ${OUT} ${NAD_DIR}/${OUT}.dist +diff -b ${OUT} ${TEST_OLD_DIR}/${OUT}.dist if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURRED" diff --git a/nad/testntv2 b/test/old/testntv2 index 6983a48b..a0867789 100755 --- a/nad/testntv2 +++ b/test/old/testntv2 @@ -3,7 +3,8 @@ # Test NTv2 (.gsb) support. Assumes ntv2_0.gsb is installed. # # -NAD_DIR=`dirname $0` +TEST_OLD_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -14,7 +15,7 @@ usage() } if test -z "${EXE}"; then - EXE=../src/cs2cs + EXE=../../src/cs2cs fi if test ! -x ${EXE}; then @@ -57,7 +58,7 @@ EOF # Done! # do 'diff' with distribution results echo "diff ${OUT} with ${OUT}.dist" -diff -b ${OUT} ${NAD_DIR}/${OUT}.dist +diff -b ${OUT} ${TEST_OLD_DIR}/${OUT}.dist if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURRED" diff --git a/nad/testvarious b/test/old/testvarious index c6a082c1..dbaeb0ce 100755 --- a/nad/testvarious +++ b/test/old/testvarious @@ -3,7 +3,8 @@ # on datum files. # # -NAD_DIR=`dirname $0` +TEST_OLD_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data EXE=$1 usage() @@ -14,7 +15,7 @@ usage() } if test -z "${EXE}"; then - EXE=../src/cs2cs + EXE=../../src/cs2cs fi if test ! -x ${EXE}; then @@ -22,6 +23,10 @@ if test ! -x ${EXE}; then exit 1 fi +if test -z "${PROJ_LIB}"; then + export PROJ_LIB=$DATA_DIR +fi + # Would be great to have a universale way of selecting a locale with # a decimal separator that is not '.' if command locale >/dev/null 2>/dev/null; then @@ -37,7 +42,7 @@ echo "Running ${0} using ${EXE}:" echo "============================================" OUT=tv_out -#EXE=../src/cs2cs + # echo "doing tests into file ${OUT}, please wait" rm -f ${OUT} @@ -938,7 +943,7 @@ EOF # Done! # do 'diff' with distribution results echo "diff ${OUT} with ${OUT}.dist" -diff -b ${OUT} ${NAD_DIR}/${OUT}.dist +diff -b ${OUT} ${TEST_OLD_DIR}/${OUT}.dist if [ $? -ne 0 ] ; then echo "" echo "PROBLEMS HAVE OCCURRED" diff --git a/nad/tf_out.dist b/test/old/tf_out.dist index 9f1778e7..9f1778e7 100644 --- a/nad/tf_out.dist +++ b/test/old/tf_out.dist diff --git a/nad/tv_out.dist b/test/old/tv_out.dist index 222c0c5f..222c0c5f 100644 --- a/nad/tv_out.dist +++ b/test/old/tv_out.dist diff --git a/travis/install.sh b/travis/install.sh index 714d21ed..eecf343a 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -25,7 +25,7 @@ cd build_autoconf ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all make -j3 make install -# We have a small issue with out-of-tree builds where the null file is generated in the build directory, but other non-generated stuff is in $(top_srcdir)/nad +# We have a small issue with out-of-tree builds where the null file is generated in the build directory, but other non-generated stuff is in $(top_srcdir)/data # Workaround this by using the install directory... PROJ_LIB=/tmp/proj_autoconf_install_from_dist_all/share/proj make check find /tmp/proj_autoconf_install_from_dist_all @@ -47,25 +47,25 @@ cd .. cd ../.. # Install grid files -cd nad +cd data unzip -o ../proj-datumgrid-1.7.zip GRIDDIR=`pwd` echo $GRIDDIR cd .. # autoconf build with grids -mkdir build_autoconf_nad -cd build_autoconf_nad -../configure --prefix=/tmp/proj_autoconf_install_nad +mkdir build_autoconf_grids +cd build_autoconf_grids +../configure --prefix=/tmp/proj_autoconf_install_grids make -j3 make install -find /tmp/proj_autoconf_install_nad +find /tmp/proj_autoconf_install_grids PROJ_LIB=$GRIDDIR make check cd src make multistresstest make test228 cd .. -PROJ_LIB=../nad src/multistresstest +PROJ_LIB=../data src/multistresstest cd .. # autoconf build with grids and coverage diff --git a/travis/mingw32/install.sh b/travis/mingw32/install.sh index c57b03d3..8abc98ac 100755 --- a/travis/mingw32/install.sh +++ b/travis/mingw32/install.sh @@ -18,12 +18,12 @@ find /tmp/proj_autoconf_install cd .. # Now with grids wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip -cd nad +cd data unzip -o ../proj-datumgrid-1.5.zip cd .. # autoconf build with grids -mkdir build_autoconf_nad -cd build_autoconf_nad +mkdir build_autoconf_grids +cd build_autoconf_grids CC="ccache x86_64-w64-mingw32-gcc" CXX="ccache x86_64-w64-mingw32-g++" LD=x86_64-w64-mingw32-ld ../configure --host=x86_64-w64-mingw32 --prefix=/tmp/proj_autoconf_install_nad make -j3 make install @@ -33,6 +33,6 @@ cd src make multistresstest.exe make test228.exe cd .. -PROJ_LIB=../nad src/multistresstest.exe -num_iterations 100000 +PROJ_LIB=../data src/multistresstest.exe -num_iterations 100000 cd .. |
