#!/bin/sh ## ## Copyright (C) 2004-2006 Autodesk, Inc. ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of version 2.1 of the GNU Lesser ## General Public License as published by the Free Software Foundation. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public ## License along with this library; if not, write to the Free Software ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## check_for_errors() { # $ 1 is the return code # $ 2 is text to display on failure. if [ "${1}" -ne "0" ]; then echo "ERROR # ${1} : ${2}" if [ "${3}" -ne "0" ]; then # make our script exit with the right error code. exit ${1} fi fi } # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <& /dev/null echo "unzip files done..." pushd "$FDOTARGETFOLDER/$FDOTARZIPFOLDERRTB" >& /dev/null export FDO="$PWD/Fdo" export FDOUTILITIES="$PWD/Utilities" export FDOTHIRDPARTY="$PWD/Thirdparty" mkdir -p "/usr/local/fdo-3.2.0/lib" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/fdo-3.2.0/lib:$SDEHOME/lib popd >& /dev/null echo "*Starting thirdparty build" pushd "$FDOTARGETFOLDER/$FDOTARZIPFOLDERRTB" >& /dev/null ./build_thirdparty.sh >& thirdparty_build_log.txt check_for_errors $? "Thirdparty build returned an error, please check thirdparty_build_log.txt for more information" "1" echo "*Starting fdocore release build" ./build_linux.sh --c release --d build >& fdocore_build_log.txt check_for_errors $? "Fdocore build returned an error, please check fdocore_build_log.txt for more information" "1" echo "End release build" echo "*Starting unit tests" pushd Fdo/UnitTest >& /dev/null ./UnitTest >& ../../Fdo_unit_test_log.txt check_for_errors $? "Fdo unit test returned an error, please check Fdo_unit_test_log.txt for more information" "0" popd >& /dev/null pushd Providers/SHP/Src/UnitTest >& /dev/null ./UnitTest >& ../../../../Shp_unit_test_log.txt check_for_errors $? "Shp unit test returned an error, please check Shp_unit_test_log.txt for more information" "0" popd >& /dev/null pushd Providers/SDF/Src/UnitTest >& /dev/null ./UnitTest >& ../../../../Sdf_unit_test_log.txt check_for_errors $? "Sdf unit test returned an error, please check Sdf_unit_test_log.txt for more information" "0" popd >& /dev/null pushd Providers/WMS/Src/UnitTest >& /dev/null ./UnitTest >& ../../../../Wms_unit_test_log.txt check_for_errors $? "Wms unit test returned an error, please check Wms_unit_test_log.txt for more information" "0" popd >& /dev/null pushd Providers/ArcSDE/Src/UnitTest >& /dev/null ./UnitTest server=adfdo.dnsalias.com port_multi=5151/tcp port_single=5151/tcp sdepwd=system dataset=FC4 rdbms=ORACLE >& ../../../../ArcSDE_unit_test_log.txt check_for_errors $? "ArcSDE unit test returned an error, please check ArcSDE_unit_test_log.txt for more information" "0" popd >& /dev/null pushd Providers/GDAL/Src/UnitTest >& /dev/null ./UnitTest >& ../../../../GDAL_unit_test_log.txt check_for_errors $? "GDAL unit test returned an error, please check GDAL_unit_test_log.txt for more information" "0" popd >& /dev/null popd >& /dev/null echo "End unit tests..." exit 0