diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-02-26 20:36:33 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-02-27 13:19:13 +0100 |
| commit | a9bc6e5fb000f618c9df6276f4ef79063ce4cdfc (patch) | |
| tree | fc9f7df9d9d237f42c49137e863a501717f8718e /travis | |
| parent | 8d665f20a743b136cb43943ff255ddadf1ead92d (diff) | |
| download | PROJ-a9bc6e5fb000f618c9df6276f4ef79063ce4cdfc.tar.gz PROJ-a9bc6e5fb000f618c9df6276f4ef79063ce4cdfc.zip | |
Make tests independent of proj-datumgrid
Fixes #1984
- Copy BETA2007.gsb, MD, alaska, conus, ntf_r93.gsb, ntv1_can.dat grids
from proj-datumgrid to data/tests.
- Replace a couple uses of nzgd2kgrid0005.gsb in tests by ntf_r93.gsb
- Add downsampled/subsetted versions of egm96_15.gtx as tests/egm96_15_downsampled.gtx
and ntv2_0.gsb as tests/ntv2_0_downsampled.gsb
This results in a few changes in expected results
- Simpify travis/install.sh due to less configurations to test
This results in a hopefully acceptable increase of the proj-X.Y.Z.tar.gz
from 2.9 to 5.3 MB
Diffstat (limited to 'travis')
| -rwxr-xr-x | travis/install.sh | 155 | ||||
| -rwxr-xr-x | travis/mingw32/install.sh | 23 |
2 files changed, 66 insertions, 112 deletions
diff --git a/travis/install.sh b/travis/install.sh index b0c16881..701eef21 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -13,82 +13,81 @@ if test "x${NPROC}" = "x"; then fi echo "NPROC=${NPROC}" -# Download grid files -wget https://download.osgeo.org/proj/proj-datumgrid-1.8.zip -wget "https://github.com/OSGeo/proj-datumgrid/blob/master/north-america/ntv2_0.gsb?raw=true" -O ntv2_0.gsb - # prepare build files ./autogen.sh TOP_DIR=$PWD -if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then - - # autoconf build - mkdir build_autoconf - cd build_autoconf - ../configure - make dist-all - # Check consistency of generated tarball - TAR_FILENAME=`ls *.tar.gz` - TAR_DIRECTORY=`basename $TAR_FILENAME .tar.gz` - tar xvzf $TAR_FILENAME - cd $TAR_DIRECTORY +# autoconf build +mkdir build_autoconf +cd build_autoconf +../configure +make dist-all +# Check consistency of generated tarball +TAR_FILENAME=`ls *.tar.gz` +TAR_DIRECTORY=`basename $TAR_FILENAME .tar.gz` +tar xvzf $TAR_FILENAME +cd $TAR_DIRECTORY + +# There's a nasty #define CS in a Solaris system header. Avoid being caught about that again +CXXFLAGS="-DCS=do_not_use_CS_for_solaris_compat $CXXFLAGS" + +# autoconf build from generated tarball +mkdir build_autoconf +cd build_autoconf +../configure --prefix=/tmp/proj_autoconf_install_from_dist_all - # There's a nasty #define CS in a Solaris system header. Avoid being caught about that again - CXXFLAGS="-DCS=do_not_use_CS_for_solaris_compat $CXXFLAGS" +make -j${NPROC} - # autoconf build from generated tarball - mkdir build_autoconf - cd build_autoconf - ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all +if [ "$(uname)" == "Linux" -a -f src/.libs/libproj.so ]; then +if objdump -TC "$1" | grep "elf64-x86-64">/dev/null; then + echo "Checking exported symbols..." + ${TOP_DIR}/scripts/dump_exported_symbols.sh src/.libs/libproj.so > /tmp/got_symbols.txt + diff -u ${TOP_DIR}/scripts/reference_exported_symbols.txt /tmp/got_symbols.txt || (echo "Difference(s) found in exported symbols. If intended, refresh scripts/reference_exported_symbols.txt with 'scripts/dump_exported_symbols.sh src/.libs/libproj.so > scripts/reference_exported_symbols.txt'"; exit 1) +fi +fi - make -j${NPROC} +make check +make install +find /tmp/proj_autoconf_install_from_dist_all + +/tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:32631 -o PROJJSON -q > out.json +cat out.json +echo "Validating JSON" +jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" + +/tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:4326+3855 -o PROJJSON -q > out.json +cat out.json +echo "Validating JSON" +jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" + +/tmp/proj_autoconf_install_from_dist_all/bin/projinfo "+proj=longlat +ellps=GRS80 +nadgrids=@foo +type=crs" -o PROJJSON -q > out.json +cat out.json +echo "Validating JSON" +jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" +/tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json +diff -u out.json out2.json + +/tmp/proj_autoconf_install_from_dist_all/bin/projinfo -s EPSG:3111 -t GDA2020 -o PROJJSON -o PROJJSON -q > out.json +cat out.json +echo "Validating JSON" +jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" +/tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json +diff -u out.json out2.json - if [ "$(uname)" == "Linux" -a -f src/.libs/libproj.so ]; then - if objdump -TC "$1" | grep "elf64-x86-64">/dev/null; then - echo "Checking exported symbols..." - ${TOP_DIR}/scripts/dump_exported_symbols.sh src/.libs/libproj.so > /tmp/got_symbols.txt - diff -u ${TOP_DIR}/scripts/reference_exported_symbols.txt /tmp/got_symbols.txt || (echo "Difference(s) found in exported symbols. If intended, refresh scripts/reference_exported_symbols.txt with 'scripts/dump_exported_symbols.sh src/.libs/libproj.so > scripts/reference_exported_symbols.txt'"; exit 1) - fi - fi +# Test make clean target +make clean - make check - make install - find /tmp/proj_autoconf_install_from_dist_all - - /tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:32631 -o PROJJSON -q > out.json - cat out.json - echo "Validating JSON" - jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" - - /tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:4326+3855 -o PROJJSON -q > out.json - cat out.json - echo "Validating JSON" - jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" - - /tmp/proj_autoconf_install_from_dist_all/bin/projinfo "+proj=longlat +ellps=GRS80 +nadgrids=@foo +type=crs" -o PROJJSON -q > out.json - cat out.json - echo "Validating JSON" - jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" - /tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json - diff -u out.json out2.json - - /tmp/proj_autoconf_install_from_dist_all/bin/projinfo -s EPSG:3111 -t GDA2020 -o PROJJSON -o PROJJSON -q > out.json - cat out.json - echo "Validating JSON" - jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" - /tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json - diff -u out.json out2.json +cd .. - cd .. +if [ $TRAVIS_OS_NAME != "osx" ]; then + # Check that we can retrieve the resource directory in a relative way after renaming the installation prefix + mkdir /tmp/proj_autoconf_install_from_dist_all_renamed + mv /tmp/proj_autoconf_install_from_dist_all /tmp/proj_autoconf_install_from_dist_all_renamed/subdir + LD_LIBRARY_PATH=/tmp/proj_autoconf_install_from_dist_all_renamed/subdir/lib /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory || /bin/true + LD_LIBRARY_PATH=/tmp/proj_autoconf_install_from_dist_all_renamed/subdir/lib /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory 2>/dev/null | grep "Downloading from https://cdn.proj.org into /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/share/proj" +fi - if [ $TRAVIS_OS_NAME != "osx" ]; then - # Check that we can retrieve the resource directory in a relative way after renaming the installation prefix - mkdir /tmp/proj_autoconf_install_from_dist_all_renamed - mv /tmp/proj_autoconf_install_from_dist_all /tmp/proj_autoconf_install_from_dist_all_renamed/subdir - LD_LIBRARY_PATH=/tmp/proj_autoconf_install_from_dist_all_renamed/subdir/lib /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory || /bin/true - LD_LIBRARY_PATH=/tmp/proj_autoconf_install_from_dist_all_renamed/subdir/lib /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory 2>/dev/null | grep "Downloading from https://cdn.proj.org into /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/share/proj" - fi +if [ "$BUILD_NAME" != "linux_gcc8" ]; then # cmake build from generated tarball mkdir build_cmake @@ -110,28 +109,6 @@ if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then # return to root cd ../.. -fi - -# Install grid files -(cd data && unzip -o ../proj-datumgrid-1.8.zip && cp ../ntv2_0.gsb . ) - -# autoconf build with grids -mkdir build_autoconf_grids -cd build_autoconf_grids -../configure --prefix=/tmp/proj_autoconf_install_grids -make -j${NPROC} -make check -(cd src && make multistresstest && make test228) -PROJ_LIB=../data src/multistresstest -make install - -# Test make clean target -make clean - -find /tmp/proj_autoconf_install_grids -cd .. - -if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then # There's an issue with the clang on Travis + coverage + cpp code if [ "$BUILD_NAME" != "linux_clang" ]; then @@ -147,10 +124,6 @@ if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then make -j${NPROC} make check - # Rerun tests without grids not included in proj-datumgrid - rm -v data/egm96_15.gtx - make check - if [ "$BUILD_NAME" != "linux_clang" ]; then mv src/.libs/*.gc* src mv src/conversions/.libs/*.gc* src/conversions diff --git a/travis/mingw32/install.sh b/travis/mingw32/install.sh index 8c756ced..67873dd1 100755 --- a/travis/mingw32/install.sh +++ b/travis/mingw32/install.sh @@ -54,25 +54,6 @@ make dist-all find /tmp/proj_autoconf_install (cd test; make -j2) cp -r ../data/tests /tmp/proj_autoconf_install/share/proj +cp ../data/tests/egm96_15_downsampled.gtx /tmp/proj_autoconf_install/share/proj/egm96_15.gtx +cp ../data/tests/ntv2_0_downsampled.gsb /tmp/proj_autoconf_install/share/proj/ntv2_0.gsb test/unit/test_cpp_api.exe -cd .. -# Now with grids -wget https://download.osgeo.org/proj/proj-datumgrid-1.5.zip -cd data -unzip -o ../proj-datumgrid-1.5.zip -cd .. -# autoconf build with grids -mkdir build_autoconf_grids -cd build_autoconf_grids -CC="ccache $MINGW_ARCH-gcc" CXX="ccache $MINGW_ARCH-g++" LD=$MINGW_ARCH-ld ../configure --host=$MINGW_ARCH --prefix=/tmp/proj_autoconf_install_nad --without-curl -make -j2 -make install -find /tmp/proj_autoconf_install_nad -#make check -cd src -make multistresstest.exe -make test228.exe -cd .. -PROJ_LIB=../data src/multistresstest.exe -num_iterations 100000 -cd .. - |
