[mapguide-commits] r8156 - in branches/2.6/vagrant: . centos/x64 centos/x86 scripts ubuntu/x64 ubuntu/x86

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 26 00:31:30 PDT 2014


Author: jng
Date: 2014-05-26 00:31:30 -0700 (Mon, 26 May 2014)
New Revision: 8156

Added:
   branches/2.6/vagrant/scripts/dpkgfdo.sh
   branches/2.6/vagrant/scripts/dpkgfdocore.sh
   branches/2.6/vagrant/scripts/dpkgfdoprovider.sh
   branches/2.6/vagrant/scripts/prepare_dpkg_fdo.sh
Modified:
   branches/2.6/vagrant/build.bat
   branches/2.6/vagrant/centos/x64/Vagrantfile
   branches/2.6/vagrant/centos/x86/Vagrantfile
   branches/2.6/vagrant/clean.bat
   branches/2.6/vagrant/scripts/build.sh
   branches/2.6/vagrant/scripts/csmap_optimize.sh
   branches/2.6/vagrant/ubuntu/x64/Vagrantfile
   branches/2.6/vagrant/ubuntu/x86/Vagrantfile
Log:
Vagrant configuration updates:
 - Fix bad paths in csmap_optimize.sh
 - Update the CentOS Vagrantfile to copy the FDO SDK tarball to sources, so that Ubuntu's modified Vagrantfile can pick up this tarball to build MapGuide off of it, skipping building FDO from source
 - Include dpkg scripts for FDO and a prepare_dpkg_fdo.sh allowing the Ubuntu VM to create FDO debs from the CentOS SDK tarball
 - Update Vagrantfiles so that both CentOS and Ubuntu will execute and log unit tests for FDO and MapGuide. If Ubuntu is using the FDO SDK from CentOS, it will be configured to not run FDO unit tests (as it won't be building from source)
 - Change build order so that the build on CentOS VMs occurs before the Ubuntu VMs. This is to allow for Ubuntu to use the CentOS FDO build output
 - Add support for producing debug builds with build.sh

Modified: branches/2.6/vagrant/build.bat
===================================================================
--- branches/2.6/vagrant/build.bat	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/build.bat	2014-05-26 07:31:30 UTC (rev 8156)
@@ -1,4 +1,12 @@
 @echo off
+
+rem build.bat
+rem
+rem Builds MapGuide/FDO in CentOS and Ubuntu VMs all driven by vagrant
+rem
+rem NOTE: CentOS builds must *always* precede the Ubuntu builds as Ubuntu builds may depend
+rem on the package FDO SDK tarball produced by the CentOS build
+
 SET BUILD_UBUNTU_32=1
 SET BUILD_UBUNTU_64=0
 SET BUILD_CENTOS_32=1
@@ -17,14 +25,37 @@
 echo ****************************************************
 :prepare
 echo [build]: Prepare scripts for provisioning
-if %BUILD_CENTOS_32% == 1 copy /Y scripts\*.* %ROOT%\centos\x86
-if %BUILD_UBUNTU_32% == 1 copy /Y scripts\*.* %ROOT%\ubuntu\x86
-if %BUILD_CENTOS_64% == 1 copy /Y scripts\*.* %ROOT%\centos\x64
-if %BUILD_UBUNTU_64% == 1 copy /Y scripts\*.* %ROOT%\ubuntu\x64
+if %BUILD_CENTOS_32% == 1 xcopy /S /Y /I scripts\* %ROOT%\centos\x86
+if %BUILD_UBUNTU_32% == 1 xcopy /S /Y /I scripts\* %ROOT%\ubuntu\x86
+if %BUILD_CENTOS_64% == 1 xcopy /S /Y /I scripts\* %ROOT%\centos\x64
+if %BUILD_UBUNTU_64% == 1 xcopy /S /Y /I scripts\* %ROOT%\ubuntu\x64
+:check_centos_32
+echo [build]: Checking if we're building for CentOS 32-bit
+if %BUILD_CENTOS_32% == 1 goto build_centos_32
+goto check_ubuntu_32
+:build_centos_32
+pushd centos\x86
+SET COMPONENT=CentOS Build 32-bit
+echo [build]: MapGuide CentOS build 32-bit
+if exist build rd /S /Q build
+call vagrant up
+echo [build]: vagrant returned %errorlevel%
+if "%errorlevel%"=="1" goto error
+if %TEARDOWN_CENTOS_32% == 1 (
+    echo [build]: Tearing down CentOS 32 VM
+    goto destroy_centos_32
+) else (
+    echo [build]: Not tearing down CentOS 32 VM
+    goto centos_32_done
+)
+:destroy_centos_32
+call vagrant destroy -f
+:centos_32_done
+popd
 :check_ubuntu_32
 echo [build]: Checking if we're building for Ubuntu 32-bit
 if %BUILD_UBUNTU_32% == 1 goto build_ubuntu_32
-goto check_centos_32
+goto check_centos_64
 :build_ubuntu_32
 pushd ubuntu\x86
 SET COMPONENT=Ubuntu Build 32-bit
@@ -44,33 +75,33 @@
 call vagrant destroy -f
 :ubuntu_32_done
 popd
-:check_centos_32
-echo [build]: Checking if we're building for CentOS 32-bit
-if %BUILD_CENTOS_32% == 1 goto build_centos_32
+:check_centos_64
+echo [build]: Checking if we're building for CentOS 64-bit
+if %BUILD_CENTOS_64% == 1 goto build_centos_64
 goto check_ubuntu_64
-:build_centos_32
-pushd centos\x86
-SET COMPONENT=CentOS Build 32-bit
-echo [build]: MapGuide CentOS build 32-bit
+:build_centos_64
+pushd centos\x64
+SET COMPONENT=CentOS Build 64-bit
+echo [build]: MapGuide CentOS build 64-bit
 if exist build rd /S /Q build
 call vagrant up
 echo [build]: vagrant returned %errorlevel%
 if "%errorlevel%"=="1" goto error
-if %TEARDOWN_CENTOS_32% == 1 (
-    echo [build]: Tearing down CentOS 32 VM
-    goto destroy_centos_32
+if %TEARDOWN_CENTOS_64% == 1 (
+    echo [build]: Tearing down CentOS 64 VM
+    goto destroy_centos_64
 ) else (
-    echo [build]: Not tearing down CentOS 32 VM
-    goto centos_32_done
+    echo [build]: Not tearing down CentOS 64 VM
+    goto centos_64_done
 )
-:destroy_centos_32
+:destroy_centos_64
 call vagrant destroy -f
-:centos_32_done
+:centos_64_done
 popd
 :check_ubuntu_64
 echo [build]: Checking if we're building for Ubuntu 64-bit
 if %BUILD_UBUNTU_64% == 1 goto build_ubuntu_64
-goto check_centos_64
+goto quit
 :build_ubuntu_64
 pushd ubuntu\x64
 SET COMPONENT=Ubuntu Build 64-bit
@@ -90,30 +121,7 @@
 call vagrant destroy -f
 :ubuntu_64_done
 popd
-:check_centos_64
-echo [build]: Checking if we're building for CentOS 64-bit
-if %BUILD_CENTOS_64% == 1 goto build_centos_64
 goto quit
-:build_centos_64
-pushd centos\x64
-SET COMPONENT=CentOS Build 64-bit
-echo [build]: MapGuide CentOS build 64-bit
-if exist build rd /S /Q build
-call vagrant up
-echo [build]: vagrant returned %errorlevel%
-if "%errorlevel%"=="1" goto error
-if %TEARDOWN_CENTOS_64% == 1 (
-    echo [build]: Tearing down CentOS 64 VM
-    goto destroy_centos_64
-) else (
-    echo [build]: Not tearing down CentOS 64 VM
-    goto centos_64_done
-)
-:destroy_centos_64
-call vagrant destroy -f
-:centos_64_done
-popd
-goto quit
 :error
 echo [ERROR]: There was an error building the component %COMPONENT%
 exit /B 1

Modified: branches/2.6/vagrant/centos/x64/Vagrantfile
===================================================================
--- branches/2.6/vagrant/centos/x64/Vagrantfile	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/centos/x64/Vagrantfile	2014-05-26 07:31:30 UTC (rev 8156)
@@ -147,12 +147,14 @@
 HAVE_FDO=0
 HAVE_FDO_LIBS=0
 HAVE_MAPGUIDE=0
-MG_UNIT_TEST=0
-FDO_UNIT_TEST=0
+MG_UNIT_TEST=1
+FDO_UNIT_TEST=1
 SCRIPT_ROOT=~/scripts
 FDO_SRC_ROOT=~/fdo/branches
 FDO_VER_MM=3.9
+FDO_VER_FULL=${FDO_VER_MM}.0
 MG_VER_MM=2.6
+MG_VER_FULL=${MG_VER_MM}.0
 FDO_SRC_DIR=3.9
 FDO_SRC=$FDO_SRC_ROOT/$FDO_SRC_DIR
 FDO_LIB_SRC=~/fdo_rdbms_thirdparty
@@ -172,12 +174,25 @@
 then
     HAVE_MAPGUIDE=1
 fi
+if [ -f /usr/include/asm/atomic.h ];
+then
+    echo [provision]: atomic.h exists. Doing nothing
+else
+    echo [provision]: Copy atomic.h
+    sudo mkdir -p /usr/include/asm
+    sudo cp /mapguide_sources/atomic.h /usr/include/asm
+fi
 #echo [provision]: Checking all tools and libs are in place
 #yum install -y gcc-* gd-* automake bison byacc flex doxygen expat expat-devel libtool libjpeg-devel libpng libpng-devel libxml2 libxml2-devel openssl curl curl-devel libxslt libxslt-devel subversion java-1.7.0-openjdk java-1.7.0-openjdk-devel ant dos2unix openssh-server openldap-devel alsa-lib-devel pcre-devel unixODBC-devel libcom_err-devel krb5-devel openssl-devel mysql-devel postgresql-devel unixODBC
+echo [provision]: Clean line endings
+sudo dos2unix /vagrant/*.sh
+sudo dos2unix /vagrant/*.pl
+sudo dos2unix /vagrant/*.txt
 echo [provision]: Copying shell scripts
 mkdir -p $SCRIPT_ROOT
 cp -f /vagrant/*.sh $SCRIPT_ROOT
 cp -f /vagrant/*.pl $SCRIPT_ROOT
+cp -f /vagrant/*.txt $SCRIPT_ROOT
 echo [provision]: Flip Ubuntu switch
 cd $SCRIPT_ROOT
 sed -i 's/UBUNTU=1/UBUNTU=0/g' build.sh
@@ -235,46 +250,79 @@
 > ~/unit_test_status.log
 if [ $FDO_UNIT_TEST -eq 1 ];
 then
+    export NLSPATH=/usr/local/fdo-${FDO_VER_FULL}/nls/%N
     echo [provision]: Unit test FDO
     BUILD_COMPONENT="Unit Test FDO Core"
     cd $SCRIPT_ROOT/fdo_build_area/Fdo/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SHP Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SHP/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SDF Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SDF/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SQLite Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SQLite/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test GDAL Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/GDAL/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test WMS Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/WMS/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
     check_test
 fi
 if [ $MG_UNIT_TEST -eq 1 ];
 then
     echo [provision]: Unit test MapGuide
     BUILD_COMPONENT="Unit Test MapGuide Server"
-    cd $SCRIPT_ROOT/mgdev
-    sudo make check 2>&1 | tee ~/mapguide_unit_test.log
-    check_test
+    # HACK: Tile and Resource Service tests are known to freeze our VMs when driven by vagrant (why? who knows? 
+    # All we know is that those tests involve threads)
+    # So test everything *but* the above services. If required, this can be tested under a manually controlled
+    # VM
+    #
+    # build the individual targets that would comprise "make check" sans execution of unittest.sh
+    cd $SCRIPT_ROOT/mgdev/Server/src/UnitTesting
+    sudo make libMgUnitTesting.la
+    cd $SCRIPT_ROOT/mgdev/Server/src/Core
+    sudo make unittest.sh
+    # Run the test suites individually except for TileService/ResourceService for reasons already stated
+    for comp in CoordinateSystem FeatureService Geometry KmlService LogManager MdfModel Misc RenderingService ServerAdminService ServerManager ServiceManager SiteManager SiteService ProfilingService TransformMesh
+    do
+        sudo -E ./mgserver test $comp UnitTestResults_${comp}.xml 2>&1 | tee ~/mapguide_${comp}_unit_test.log
+        check_test
+        if [ -f UnitTestResults_${comp}.xml ]; then
+            sudo mv UnitTestResults_${comp}.xml ~/UnitTestResults_${comp}.xml
+        fi
+    done
 fi
 cd $SCRIPT_ROOT
+echo [provision]: Make output dir
 sudo mkdir -p /vagrant/build
+echo [provision]: Copy log files to output dir
 sudo mv -f ~/*.log /vagrant/build
+echo [provision]: Copy tarballs to output dir
 sudo cp bin/*.tar.gz /vagrant/build
-sudo cp fdosdk*.tar.gz /vagrant/build
-sudo cp ~/unit_test_status.log /vagrant/build/unit_test_status.log
+sudo cp fdosdk-centos6-i386-${FDO_VER_FULL}_${FDO_REV}.tar.gz /vagrant/build
+echo [provision]: Copy FDO SDK for Ubuntu builds
+# Copy SDK also to sources, so Ubuntu can pick it up
+sudo rm -f /mapguide_sources/fdosdk*.tar.gz
+sudo cp fdosdk-centos6-amd64-${FDO_VER_FULL}_${FDO_REV}.tar.gz /mapguide_sources
+# Record file name so Ubuntu knows what tarball to extract from
+sudo echo fdosdk-centos6-amd64-${FDO_VER_FULL}_${FDO_REV}.tar.gz > /mapguide_sources/fdosdk_filename
+sudo echo ${FDO_REV} > /mapguide_sources/fdosdk_rev
+# Export filelist to Ubuntu can deb package this SDK if needed
+sudo cp -R $SCRIPT_ROOT/fdo_build_area/install/filelist /mapguide_sources
+echo [provision]: Copy unit test logs to output dir
+sudo mv ~/unit_test_status.log /vagrant/build/unit_test_status.log
+sudo mv ~/fdo_*_unit_test.log /vagrant/build
+sudo mv ~/UnitTestResults_*.xml /vagrant/build
+echo [provision]: Copy install/uninstall scripts to output dir
 sudo cp /vagrant/mginstallcentos.sh /vagrant/build/mginstallcentos.sh
 sudo sed -i 's/FDOVER_REV=0/FDOVER_REV='"$FDO_REV"'/g' /vagrant/build/mginstallcentos.sh
 sudo sed -i 's/MGVER_REV=0/MGVER_REV='"$MG_REV"'/g' /vagrant/build/mginstallcentos.sh

Modified: branches/2.6/vagrant/centos/x86/Vagrantfile
===================================================================
--- branches/2.6/vagrant/centos/x86/Vagrantfile	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/centos/x86/Vagrantfile	2014-05-26 07:31:30 UTC (rev 8156)
@@ -147,12 +147,14 @@
 HAVE_FDO=0
 HAVE_FDO_LIBS=0
 HAVE_MAPGUIDE=0
-MG_UNIT_TEST=0
-FDO_UNIT_TEST=0
+MG_UNIT_TEST=1
+FDO_UNIT_TEST=1
 SCRIPT_ROOT=~/scripts
 FDO_SRC_ROOT=~/fdo/branches
 FDO_VER_MM=3.9
+FDO_VER_FULL=${FDO_VER_MM}.0
 MG_VER_MM=2.6
+MG_VER_FULL=${MG_VER_MM}.0
 FDO_SRC_DIR=3.9
 FDO_SRC=$FDO_SRC_ROOT/$FDO_SRC_DIR
 FDO_LIB_SRC=~/fdo_rdbms_thirdparty
@@ -172,12 +174,25 @@
 then
     HAVE_MAPGUIDE=1
 fi
+if [ -f /usr/include/asm/atomic.h ];
+then
+    echo [provision]: atomic.h exists. Doing nothing
+else
+    echo [provision]: Copy atomic.h
+    sudo mkdir -p /usr/include/asm
+    sudo cp /mapguide_sources/atomic.h /usr/include/asm
+fi
 #echo [provision]: Checking all tools and libs are in place
 #yum install -y gcc-* gd-* automake bison byacc flex doxygen expat expat-devel libtool libjpeg-devel libpng libpng-devel libxml2 libxml2-devel openssl curl curl-devel libxslt libxslt-devel subversion java-1.7.0-openjdk java-1.7.0-openjdk-devel ant dos2unix openssh-server openldap-devel alsa-lib-devel pcre-devel unixODBC-devel libcom_err-devel krb5-devel openssl-devel mysql-devel postgresql-devel unixODBC
+echo [provision]: Clean line endings
+sudo dos2unix /vagrant/*.sh
+sudo dos2unix /vagrant/*.pl
+sudo dos2unix /vagrant/*.txt
 echo [provision]: Copying shell scripts
 mkdir -p $SCRIPT_ROOT
 cp -f /vagrant/*.sh $SCRIPT_ROOT
 cp -f /vagrant/*.pl $SCRIPT_ROOT
+cp -f /vagrant/*.txt $SCRIPT_ROOT
 echo [provision]: Flip Ubuntu switch
 cd $SCRIPT_ROOT
 sed -i 's/UBUNTU=1/UBUNTU=0/g' build.sh
@@ -235,46 +250,79 @@
 > ~/unit_test_status.log
 if [ $FDO_UNIT_TEST -eq 1 ];
 then
+    export NLSPATH=/usr/local/fdo-${FDO_VER_FULL}/nls/%N
     echo [provision]: Unit test FDO
     BUILD_COMPONENT="Unit Test FDO Core"
     cd $SCRIPT_ROOT/fdo_build_area/Fdo/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SHP Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SHP/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SDF Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SDF/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SQLite Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SQLite/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test GDAL Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/GDAL/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test WMS Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/WMS/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
     check_test
 fi
 if [ $MG_UNIT_TEST -eq 1 ];
 then
     echo [provision]: Unit test MapGuide
     BUILD_COMPONENT="Unit Test MapGuide Server"
-    cd $SCRIPT_ROOT/mgdev
-    sudo make check 2>&1 | tee ~/mapguide_unit_test.log
-    check_test
+    # HACK: Tile and Resource Service tests are known to freeze our VMs when driven by vagrant (why? who knows? 
+    # All we know is that those tests involve threads)
+    # So test everything *but* the above services. If required, this can be tested under a manually controlled
+    # VM
+    #
+    # build the individual targets that would comprise "make check" sans execution of unittest.sh
+    cd $SCRIPT_ROOT/mgdev/Server/src/UnitTesting
+    sudo make libMgUnitTesting.la
+    cd $SCRIPT_ROOT/mgdev/Server/src/Core
+    sudo make unittest.sh
+    # Run the test suites individually except for TileService/ResourceService for reasons already stated
+    for comp in CoordinateSystem FeatureService Geometry KmlService LogManager MdfModel Misc RenderingService ServerAdminService ServerManager ServiceManager SiteManager SiteService ProfilingService TransformMesh
+    do
+        sudo -E ./mgserver test $comp UnitTestResults_${comp}.xml 2>&1 | tee ~/mapguide_${comp}_unit_test.log
+        check_test
+        if [ -f UnitTestResults_${comp}.xml ]; then
+            sudo mv UnitTestResults_${comp}.xml ~/UnitTestResults_${comp}.xml
+        fi
+    done
 fi
 cd $SCRIPT_ROOT
+echo [provision]: Make output dir
 sudo mkdir -p /vagrant/build
+echo [provision]: Copy log files to output dir
 sudo mv -f ~/*.log /vagrant/build
+echo [provision]: Copy tarballs to output dir
 sudo cp bin/*.tar.gz /vagrant/build
-sudo cp fdosdk*.tar.gz /vagrant/build
-sudo cp ~/unit_test_status.log /vagrant/build/unit_test_status.log
+sudo cp fdosdk-centos6-i386-${FDO_VER_FULL}_${FDO_REV}.tar.gz /vagrant/build
+echo [provision]: Copy FDO SDK for Ubuntu builds
+# Copy SDK also to sources, so Ubuntu can pick it up
+sudo rm -f /mapguide_sources/fdosdk*.tar.gz
+sudo cp fdosdk-centos6-i386-${FDO_VER_FULL}_${FDO_REV}.tar.gz /mapguide_sources
+# Record file name so Ubuntu knows what tarball to extract from
+sudo echo fdosdk-centos6-i386-${FDO_VER_FULL}_${FDO_REV}.tar.gz > /mapguide_sources/fdosdk_filename
+sudo echo ${FDO_REV} > /mapguide_sources/fdosdk_rev
+# Export filelist to Ubuntu can deb package this SDK if needed
+sudo cp -R $SCRIPT_ROOT/fdo_build_area/install/filelist /mapguide_sources
+echo [provision]: Copy unit test logs to output dir
+sudo mv ~/unit_test_status.log /vagrant/build/unit_test_status.log
+sudo mv ~/fdo_*_unit_test.log /vagrant/build
+sudo mv ~/UnitTestResults_*.xml /vagrant/build
+echo [provision]: Copy install/uninstall scripts to output dir
 sudo cp /vagrant/mginstallcentos.sh /vagrant/build/mginstallcentos.sh
 sudo sed -i 's/FDOVER_REV=0/FDOVER_REV='"$FDO_REV"'/g' /vagrant/build/mginstallcentos.sh
 sudo sed -i 's/MGVER_REV=0/MGVER_REV='"$MG_REV"'/g' /vagrant/build/mginstallcentos.sh

Modified: branches/2.6/vagrant/clean.bat
===================================================================
--- branches/2.6/vagrant/clean.bat	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/clean.bat	2014-05-26 07:31:30 UTC (rev 8156)
@@ -2,38 +2,50 @@
 SET ROOT=%CD%
 SET COMPONENT=
 pushd sources
-rd /S /Q updated
+if exist updated rd /S /Q updated
+if exist filelist rd /S /Q filelist
+if exist fdosdk_filename del /F fdosdk_filename
+if exist fdosdk_rev del /F fdosdk_rev
+del /F fdosdk*.tar.gz
 popd
 pushd ubuntu\x86
 SET COMPONENT=Ubuntu Build 32-bit
 echo [clean]: MapGuide Ubuntu build 32-bit
 if exist build rd /S /Q build
+if exist filelist rd /S /Q filelist
 if exist *.sh del *.sh
 if exist *.pl del *.pl
+if exist *.txt del *.txt
 call vagrant destroy -f
 popd
 pushd centos\x86
 SET COMPONENT=CentOS Build 32-bit
 echo [clean]: MapGuide CentOS build 32-bit
 if exist build rd /S /Q build
+if exist filelist rd /S /Q filelist
 if exist *.sh del *.sh
 if exist *.pl del *.pl
+if exist *.txt del *.txt
 call vagrant destroy -f
 popd
 pushd ubuntu\x64
 SET COMPONENT=Ubuntu Build 64-bit
 echo [clean]: MapGuide Ubuntu build 64-bit
 if exist build rd /S /Q build
+if exist filelist rd /S /Q filelist
 if exist *.sh del *.sh
 if exist *.pl del *.pl
+if exist *.txt del *.txt
 call vagrant destroy -f
 popd
 pushd centos\x64
 SET COMPONENT=CentOS Build 64-bit
 echo [clean]: MapGuide CentOS build 64-bit
 if exist build rd /S /Q build
+if exist filelist rd /S /Q filelist
 if exist *.sh del *.sh
 if exist *.pl del *.pl
+if exist *.txt del *.txt
 call vagrant destroy -f
 popd
 goto quit

Modified: branches/2.6/vagrant/scripts/build.sh
===================================================================
--- branches/2.6/vagrant/scripts/build.sh	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/scripts/build.sh	2014-05-26 07:31:30 UTC (rev 8156)
@@ -138,15 +138,24 @@
 
 echo "Building Oem"
 BUILD_COMPONENT="Oem"
-if [ ${MGDEBUG} -eq 1 ]; then
-    ./build_oem.sh --prefix ${INSTALLROOT} --config debug
-    check_build
+if [ $(uname -m) = "x86_64" ]; then
+    if [ ${MGDEBUG} -eq 1 ]; then
+        ./build_oem.sh --prefix ${INSTALLROOT} --build 64 --config debug
+        check_build
+    else
+        ./build_oem.sh --prefix ${INSTALLROOT} --build 64
+        check_build
+    fi
 else
-    ./build_oem.sh --prefix ${INSTALLROOT}
-    check_build
+    if [ ${MGDEBUG} -eq 1 ]; then
+        ./build_oem.sh --prefix ${INSTALLROOT} --config debug
+        check_build
+    else
+        ./build_oem.sh --prefix ${INSTALLROOT}
+        check_build
+    fi
 fi
 
-
 echo "Building Fusion"
 pushd ${MGSOURCE}/Oem/fusion
 BUILD_COMPONENT="Fusion"

Modified: branches/2.6/vagrant/scripts/csmap_optimize.sh
===================================================================
--- branches/2.6/vagrant/scripts/csmap_optimize.sh	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/scripts/csmap_optimize.sh	2014-05-26 07:31:30 UTC (rev 8156)
@@ -20,7 +20,7 @@
 CSMAP_OUT=/tmp/csmap_build_area/share/gis/coordsys
 
 if [ ! -d /tmp/csmap_build_area ]; then
-    mkdir -p ~/tmp/csmap_build_area
+    mkdir -p /tmp/csmap_build_area
 fi
 
 comment_gdc()
@@ -42,8 +42,8 @@
 # Copy CS-Map files to build area. We rely on the fact that the MapGuide build system
 # also leaves a copy of the CS_Comp executable in this directory which we'll use to 
 # re-compile our dictionary files after some modifications
-cp -R /${MGINST}/share/gis/coordsys/* ~/csmap_build_area
-pushd ~/csmap_build_area
+cp -R /${MGINST}/share/gis/coordsys/* /tmp/csmap_build_area
+pushd /tmp/csmap_build_area
     # Comment out grid file entries in all gdc files
     for gdcf in *.gdc
     do

Added: branches/2.6/vagrant/scripts/dpkgfdo.sh
===================================================================
--- branches/2.6/vagrant/scripts/dpkgfdo.sh	                        (rev 0)
+++ branches/2.6/vagrant/scripts/dpkgfdo.sh	2014-05-26 07:31:30 UTC (rev 8156)
@@ -0,0 +1,20 @@
+#!/bin/bash
+#ARCH=`arch`
+#REPO=http://svn.osgeo.org/fdo/branches/3.5
+#BUILDNUM=`svn info ${REPO} | awk '/Changed Rev/ {print $4}'`
+ARCH="$1"
+BUILDNUM="$2"
+echo Building FDO arch=${ARCH} buildnum=${BUILDNUM}
+./dpkgfdocore.sh $ARCH $BUILDNUM
+./dpkgfdoprovider.sh $ARCH $BUILDNUM sdf
+./dpkgfdoprovider.sh $ARCH $BUILDNUM shp
+./dpkgfdoprovider.sh $ARCH $BUILDNUM wfs
+./dpkgfdoprovider.sh $ARCH $BUILDNUM wms
+# ArcSDE provider currently disabled due to missing libraries
+#./dpkgfdoprovider.sh $ARCH $BUILDNUM arcsde
+./dpkgfdoprovider.sh $ARCH $BUILDNUM rdbms
+./dpkgfdoprovider.sh $ARCH $BUILDNUM gdal
+./dpkgfdoprovider.sh $ARCH $BUILDNUM ogr
+./dpkgfdoprovider.sh $ARCH $BUILDNUM postgis
+./dpkgfdoprovider.sh $ARCH $BUILDNUM kingoracle
+./dpkgfdoprovider.sh $ARCH $BUILDNUM sqlite

Added: branches/2.6/vagrant/scripts/dpkgfdocore.sh
===================================================================
--- branches/2.6/vagrant/scripts/dpkgfdocore.sh	                        (rev 0)
+++ branches/2.6/vagrant/scripts/dpkgfdocore.sh	2014-05-26 07:31:30 UTC (rev 8156)
@@ -0,0 +1,225 @@
+#!/bin/bash
+
+# Build directory structure underneath directory of this script
+# debian/ - common build directory for all packages
+#   control - generated all packages control file with subst params
+#   changelog - generated changelog file
+#   substvars - subst params created by dpkg-shlibdeps
+#   fdocore/ - directory to build FDO Base libs package
+#     usr/local/fdo-3.9.0/ - copied tree for core fdo libs
+#     DEBIAN/
+#       control - control file generated from dpkg-gencontrol
+#       symbols - symbols file generated from dpkg-gensymbols
+# 
+BUILDROOT=`pwd`
+FDOBUILD=3.9.0
+FDO=usr/local/fdo-${FDOBUILD}
+ROOT=${BUILDROOT}/debian/fdocore
+TREE=${BUILDROOT}/debian
+CPROOT=${ROOT}/${FDO}
+
+# Create output directory structure and ignore errors
+#
+if [ ! -d tmp ]; then
+  mkdir tmp >& /dev/null
+  mkdir bin >& /dev/null
+  mkdir debian >& /dev/null
+else
+# clean out existing build tree
+  rm -rf tmp/*
+  rm -rf bin/*
+  rm -rf debian/*
+fi
+
+
+# Read and validate command line parameters
+#
+ARCH="$1"
+BUILDNUM="$2"
+if test -z ${ARCH}; then 
+  echo Usage: dpkgfdocore.sh [i386/amd64] svnChangeNum
+  exit -1
+fi
+if test -z ${BUILDNUM}; then 
+  echo Usage: dpkgfdocore.sh [i386/amd64] svnChangeNum
+  exit -1
+fi
+
+case $ARCH in 
+i386)
+  echo Setting architecture to i386.
+  ;;
+amd64)
+  echo Setting architecture to amd64.
+  ;;
+*)
+  echo Usage: dpkgfdocore.sh [i386/amd64] svnChangeNum
+  echo Invalid architecture.  Please specify i386 or amd64.
+  exit -1
+  ;;
+esac
+
+
+# Create control file
+#
+cat > debian/control <<END-OF-CONTROL
+Source: fdo-src
+Maintainer: FDO Internals Mail List <fdo-internals at lists.osgeo.org>
+Section: misc
+Priority: optional
+Homepage: http://fdo.osgeo.org
+
+Package: fdo-core
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdocore:Depends}
+Description:  OSGeo FDO ${FDOBUILD} base libraries
+
+Package: fdo-sdf
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdosdf:Depends}
+Description:  OSGeo FDO ${FDOBUILD} SDF Provider
+
+Package: fdo-shp
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdoshp:Depends}
+Description:  OSGeo FDO ${FDOBUILD} SHP Provider
+
+Package: fdo-wfs
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdowfs:Depends}
+Description:  OSGeo FDO ${FDOBUILD} WFS Provider
+
+Package: fdo-wms
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdowms:Depends}
+Description:  OSGeo FDO ${FDOBUILD} WMS Provider
+
+Package: fdo-arcsde
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdoarcsde:Depends}
+Description:  OSGeo FDO ${FDOBUILD} ArcSDE Provider
+
+Package: fdo-rdbms
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdordbms:Depends}
+Description:  OSGeo FDO ${FDOBUILD} Providers for ODBC, MySQL and PostgreSQL
+
+Package: fdo-gdal
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdogdal:Depends}
+Description:  OSGeo FDO ${FDOBUILD} GDAL Provider
+
+Package: fdo-ogr
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdoogr:Depends}
+Description:  OSGeo FDO ${FDOBUILD} OGR Provider
+
+Package: fdo-kingoracle
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdokingoracle:Depends}
+Description:  OSGeo FDO ${FDOBUILD} King Oracle Provider
+
+Package: fdo-sqlite
+Architecture: ${ARCH}
+Section: misc
+Priority: optional
+Depends: \${fdosqlite:Depends}
+Description:  OSGeo FDO ${FDOBUILD} SQLite Provider
+END-OF-CONTROL
+
+
+# Create changelog file
+# TODO: pull revision history from Subversion
+#
+CURRTIME=`date -R`
+cat > debian/changelog <<END-OF-CHANGELOG
+fdo-src (${FDOBUILD}-${BUILDNUM}) experimental; urgency=low
+
+  * Pre-release build.
+
+ -- FDO Internals Mail List <fdo-internals at lists.osgeo.org>  ${CURRTIME}
+END-OF-CHANGELOG
+
+
+# Pull copyright file from Subversion vault 
+wget http://svn.osgeo.org/fdo/branches/3.8/License_README.txt -O tmp/copyright
+iconv -f ISO-8859-1 -t UTF-8 tmp/copyright > debian/copyright
+
+# Blow away old build directory
+rm -rf ${ROOT}
+
+# Create and populate documentation directory for fdo-core
+mkdir -p ${ROOT}/usr/share/doc/fdo-core
+cp debian/copyright ${ROOT}/usr/share/doc/fdo-core
+cp debian/changelog ${ROOT}/usr/share/doc/fdo-core/changelog.Debian
+gzip -9 ${ROOT}/usr/share/doc/fdo-core/changelog.Debian
+
+
+# Create directories for binary package build and copy
+# install image into build directory
+for file in `cat filelist/fdocoredir.lst` 
+do
+  mkdir -p ${CPROOT}/${file}
+done
+
+for file in `cat filelist/fdocore.lst` 
+do
+  cp -a /${FDO}/${file} ${CPROOT}/${file}
+done
+
+# Remove any .la files in the lib directory since
+# lintian complains about them
+rm -f ${CPROOT}/lib/*.la
+
+# Remove unneeded symbols from files in the lib directory
+# and remove their executable status to clean up some lintian errors
+for file in `find ${CPROOT}/lib/lib*.so* -type f -print`
+do
+  strip --strip-unneeded ${file}
+  chmod a-x ${file}
+done
+
+
+# Call dpkg-shlibdeps to build out library dependencies
+# This will create the substvars file
+# LD_LIBRARY_PATH must be set to find private libs
+mkdir -p ${ROOT}/DEBIAN
+pushd ${BUILDROOT}
+# Fdo build creates full path symlinks for third party libs
+# Add install directory to path to compensate
+#export LD_LIBRARY_PATH=${CPROOT}/lib
+export LD_LIBRARY_PATH=${CPROOT}/lib:/${FDO}/lib
+dpkg-shlibdeps -pfdocore --ignore-missing-info ${CPROOT}/lib/*.so
+dpkg-gensymbols -q -p"fdo-core" -P"debian/fdocore"
+export LD_LIBRARY_PATH=
+
+# Now generate a filled in control file for the binary package
+# using information from control, changelog, and substvars
+dpkg-gencontrol -p"fdo-core" -P"debian/fdocore"
+
+# Build binary package from ROOT
+# And move resulting debian package and lintian results to build directory
+dpkg-deb -Zlzma --build ${ROOT}
+lintian -i debian/fdocore.deb > tmp/fdocore.lintian
+mv debian/fdocore.deb bin/fdo-core_${FDOBUILD}-${BUILDNUM}_${ARCH}.deb
+popd

Added: branches/2.6/vagrant/scripts/dpkgfdoprovider.sh
===================================================================
--- branches/2.6/vagrant/scripts/dpkgfdoprovider.sh	                        (rev 0)
+++ branches/2.6/vagrant/scripts/dpkgfdoprovider.sh	2014-05-26 07:31:30 UTC (rev 8156)
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+# Build directory structure underneath directory of this script
+# debian/ - common build directory for all packages
+#   control - generated all packages control file with subst params
+#   changelog - generated changelog file
+#   substvars - subst params created by dpkg-shlibdeps
+#   fdo[provider]/ - directory to build FDO Provider
+#     usr/local/fdo-3.9.0/ - copied tree for core fdo libs
+#     DEBIAN/
+#       control - control file generated from dpkg-gencontrol
+#       symbols - symbols file generated from dpkg-gensymbols
+# 
+
+
+# Read and validate command line parameters
+#
+ARCH="$1"
+BUILDNUM="$2"
+PROVIDER="$3"
+if test -z ${ARCH}; then 
+  echo Usage: dpkgfdoprovider.sh [i386/amd64] svnChangeNum provider
+  exit -1
+fi
+if test -z ${BUILDNUM}; then 
+  echo Usage: dpkgfdoprovider.sh [i386/amd64] svnChangeNum provider
+  exit -1
+fi
+
+case $ARCH in 
+i386)
+  echo Setting architecture to i386.
+  ;;
+amd64)
+  echo Setting architecture to amd64.
+  ;;
+*)
+  echo Usage: dpkgfdoprovider.sh [i386/amd64] svnChangeNum provider
+  echo Invalid architecture.  Please specify i386 or amd64.
+  exit -1
+  ;;
+esac
+
+case $PROVIDER in
+sdf) ;;
+shp) ;;
+wms) ;;
+wfs) ;;
+arcsde) ;;
+rdbms) ;;
+gdal) ;;
+ogr) ;;
+kingoracle) ;;
+sqlite) ;;
+*)
+  echo Usage: dpkgfdoprovider.sh [i386/amd64] svnChangeNum provider
+  echo Invalid provider.  Please specify one of the following providers:
+  echo sdf,shp,wms,wfs,arcsde,rdbms,gdal,ogr,postgis,kingoracle,sqlite
+  exit -1
+  ;;
+esac
+
+
+BUILDROOT=`pwd`
+FDOBUILD=3.9.0
+FDO=usr/local/fdo-${FDOBUILD}
+ROOT=${BUILDROOT}/debian/fdo${PROVIDER}
+CPROOT=${ROOT}/${FDO}
+
+# Create output directory structure and eat error messag
+#
+if [ ! -d tmp ]; then
+  mkdir tmp >& /dev/null
+  mkdir bin >& /dev/null
+  mkdir debian >& /dev/null
+fi
+
+
+# Blow away old build directory
+rm -rf ${ROOT}
+
+
+# Create and populate documentation directory for provider
+mkdir -p ${ROOT}/usr/share/doc/fdo-${PROVIDER}
+cp debian/copyright ${ROOT}/usr/share/doc/fdo-${PROVIDER}
+cp debian/changelog ${ROOT}/usr/share/doc/fdo-${PROVIDER}/changelog.Debian
+gzip -9 ${ROOT}/usr/share/doc/fdo-${PROVIDER}/changelog.Debian
+
+
+# Create directories for binary package build and copy install image
+# into build directory.  Also include fdocore directories for completeness
+for file in `cat filelist/fdocoredir.lst` 
+do
+  mkdir -p ${CPROOT}/${file}
+done
+
+for file in `cat filelist/${PROVIDER}dir.lst` 
+do
+  mkdir -p ${CPROOT}/${file}
+done
+
+for file in `cat filelist/${PROVIDER}.lst` 
+do
+  cp -a /${FDO}/${file} ${CPROOT}/${file}
+done
+
+# Remove any .la files in the lib directory since
+# lintian complains about them
+rm -f ${CPROOT}/lib/*.la
+
+# Remove unneeded symbols from files in the lib directory
+# and remove their executable status to clean up some lintian errors
+for file in `find ${CPROOT}/lib/lib*.so* -type f -print`
+do
+  strip --strip-unneeded ${file}
+  chmod a-x ${file}
+done
+
+
+# Call dpkg-shlibdeps to build out library dependencies
+# This will create the substvars file
+# LD_LIBRARY_PATH must be set to find private libs
+mkdir -p ${ROOT}/DEBIAN
+pushd ${BUILDROOT}
+# Fdo build creates full path symlinks for third party libs
+# Add install directory to path to compensate
+#export LD_LIBRARY_PATH=${CPROOT}/lib
+export LD_LIBRARY_PATH=${CPROOT}/lib:/${FDO}/lib
+dpkg-shlibdeps --ignore-missing-info -pfdo${PROVIDER} ${CPROOT}/lib/*.so
+dpkg-gensymbols -q -p"fdo-${PROVIDER}" -P"debian/fdo${PROVIDER}"
+export LD_LIBRARY_PATH=
+
+# Now generate a filled in control file for the binary package
+# using information from control, changelog, and substvars
+dpkg-gencontrol -p"fdo-${PROVIDER}" -P"debian/fdo${PROVIDER}"
+
+# Build binary package from ROOT
+# And move resulting debian package and lintian results to build directory
+dpkg-deb -Zlzma --build ${ROOT}
+lintian -i debian/fdo${PROVIDER}.deb > tmp/fdo${PROVIDER}.lintian
+mv debian/fdo${PROVIDER}.deb bin/fdo-${PROVIDER}_${FDOBUILD}-${BUILDNUM}_${ARCH}.deb
+popd

Added: branches/2.6/vagrant/scripts/prepare_dpkg_fdo.sh
===================================================================
--- branches/2.6/vagrant/scripts/prepare_dpkg_fdo.sh	                        (rev 0)
+++ branches/2.6/vagrant/scripts/prepare_dpkg_fdo.sh	2014-05-26 07:31:30 UTC (rev 8156)
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+# prepare_dpkg_fdo.sh
+#
+# Creates deb files from CentOS SDK files
+
+save_current_file_list()
+{
+    echo "[info]: Saving current FDO dir file list"
+    pushd $FDO_INST
+    # For lazy folks who build from svn working copies instead of svn exports, we need to weed out any .svn dirs before compiling the file-list
+    find . -name .svn -exec rm -rf {} \;
+    find . -type f -print > ${FDO_FILELIST}/temp.lst
+    find . -type l -print >> ${FDO_FILELIST}/temp.lst
+    sort ${FDO_FILELIST}/temp.lst > ${FDO_FILELIST}/orig.lst
+    find . -type d -print | sort > ${FDO_FILELIST}/origdir.lst
+    popd
+}
+
+update_fdocore_file_list()
+{
+    echo "[info]: Updating FDO core file list for deb packaging"
+    pushd $FDO_INST
+    # For lazy folks who build from svn working copies instead of svn exports, we need to weed out any .svn dirs before compiling the file-list
+    find . -name .svn -exec rm -rf {} \;
+    find . -type f -print > ${FDO_FILELIST}/temp.lst
+    find . -type l -print >> ${FDO_FILELIST}/temp.lst
+    sort ${FDO_FILELIST}/temp.lst > ${FDO_FILELIST}/fdocore.lst
+    find . -type d -print | sort > ${FDO_FILELIST}/fdocoredir.lst
+    popd
+}
+
+update_provider_file_list()
+{
+    PROVIDER=$1
+    echo "[info]: Updating $PROVIDER file list for deb packaging"
+    pushd $FDO_INST
+    # For lazy folks who build from svn working copies instead of svn exports, we need to weed out any .svn dirs before compiling the file-list
+    find . -name .svn -exec rm -rf {} \;
+    #mkdir -p $BUILDLIST
+    find . -type f -print > ${FDO_FILELIST}/temp.lst
+    find . -type l -print >> ${FDO_FILELIST}/temp.lst
+    cat ${FDO_FILELIST}/orig.lst >> ${FDO_FILELIST}/temp.lst
+    sort ${FDO_FILELIST}/temp.lst | uniq -u > ${FDO_FILELIST}/${PROVIDER}.lst
+    find . -type d -print | sort > ${FDO_FILELIST}/temp.lst
+    cat ${FDO_FILELIST}/origdir.lst >> ${FDO_FILELIST}/temp.lst
+    sort ${FDO_FILELIST}/temp.lst | uniq -u > ${FDO_FILELIST}/${PROVIDER}dir.lst
+    popd
+}
+
+update_fdocore_file_list
+for comp in shp sqlite gdal ogr wfs wms rdbms kingoracle sdf
+do
+    save_current_file_list
+    update_provider_file_list $comp
+done
\ No newline at end of file

Modified: branches/2.6/vagrant/ubuntu/x64/Vagrantfile
===================================================================
--- branches/2.6/vagrant/ubuntu/x64/Vagrantfile	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/ubuntu/x64/Vagrantfile	2014-05-26 07:31:30 UTC (rev 8156)
@@ -140,12 +140,14 @@
 HAVE_FDO=0
 HAVE_FDO_LIBS=0
 HAVE_MAPGUIDE=0
-MG_UNIT_TEST=0
-FDO_UNIT_TEST=0
+MG_UNIT_TEST=1
+FDO_UNIT_TEST=1
 SCRIPT_ROOT=~/scripts
 FDO_SRC_ROOT=~/fdo/branches
 FDO_VER_MM=3.9
+FDO_VER_FULL=${FDO_VER_MM}.0
 MG_VER_MM=2.6
+MG_VER_FULL=${MG_VER_MM}.0
 FDO_SRC_DIR=3.9
 FDO_SRC=$FDO_SRC_ROOT/$FDO_SRC_DIR
 FDO_LIB_SRC=~/fdo_rdbms_thirdparty
@@ -153,6 +155,12 @@
 MG_SRC=$MG_SRC_ROOT/MgDev
 FDO_TARBALL=fdo-checkout-3.9.tar.gz
 MG_TARBALL=mapguide-checkout-2.6.tar.gz
+
+HAVE_FDO_SDK=0
+FDO_SDK_PKG_PATH=~/fdosdk
+FDO_SDK_TARBALL=
+FDO_INST=/usr/local/fdo-${FDO_VER_FULL}
+
 if [ -d $FDO_SRC ]; 
 then
     HAVE_FDO=1
@@ -165,6 +173,19 @@
 then
     HAVE_MAPGUIDE=1
 fi
+if [ -f /mapguide_sources/fdosdk_filename ] && [ -f /mapguide_sources/fdosdk_rev ] && [ -d /mapguide_sources/filelist ];
+then
+    FDO_SDK_TARBALL=`cat /mapguide_sources/fdosdk_filename`
+    FDO_REV=`cat /mapguide_sources/fdosdk_rev`
+    if [ -f /mapguide_sources/$FDO_SDK_TARBALL ];
+    then
+        sudo mkdir -p ${FDO_INST}
+        sudo tar -zxf /mapguide_sources/$FDO_SDK_TARBALL -C ${FDO_INST}
+        HAVE_FDO_SDK=1
+        FDO_UNIT_TEST=0
+        echo [provision]: Using FDO SDK. Not building from source. Not running FDO unit tests.
+    fi
+fi
 if [ -f /usr/include/asm/atomic.h ];
 then
     echo [provision]: atomic.h exists. Doing nothing
@@ -175,10 +196,25 @@
 fi
 #echo [provision]: Checking libraries
 #sudo apt-get install -y libpq-dev libmysqlclient-dev
+echo [provision]: Clean line endings
+sudo dos2unix /vagrant/*.sh
+sudo dos2unix /vagrant/*.pl
+sudo dos2unix /vagrant/*.txt
 echo [provision]: Copying shell scripts
 mkdir -p $SCRIPT_ROOT
+if [ $HAVE_FDO_SDK -eq 1 ];
+then
+    echo [provision]: Prepare package build area for FDO SDK
+    mkdir -p $FDO_SDK_PKG_PATH
+    cp -R /mapguide_sources/filelist $FDO_SDK_PKG_PATH
+    cp -f /vagrant/dpkgfdo.sh $FDO_SDK_PKG_PATH
+    cp -f /vagrant/dpkgfdocore.sh $FDO_SDK_PKG_PATH
+    cp -f /vagrant/dpkgfdoprovider.sh $FDO_SDK_PKG_PATH
+    cp -f /vagrant/revnum.pl $FDO_SDK_PKG_PATH
+fi
 cp -f /vagrant/*.sh $SCRIPT_ROOT
 cp -f /vagrant/*.pl $SCRIPT_ROOT
+cp -f /vagrant/*.txt $SCRIPT_ROOT
 echo [provision]: Flip Ubuntu switch
 cd $SCRIPT_ROOT
 sed -i 's/UBUNTU=0/UBUNTU=1/g' build.sh
@@ -187,39 +223,52 @@
 sed -i 's/FDO_CPU=x86/FDO_CPU=x64/g' build_fdo.sh
 sed -i 's/FDO_BUILD_CPU=i386/FDO_BUILD_CPU=amd64/g' build_fdo.sh
 sed -i 's/LIB_DIRNAME=lib/LIB_DIRNAME=lib64/g' build_fdo.sh
-if [ $HAVE_FDO_LIBS -eq 0 ];
+if [ $HAVE_FDO_SDK -eq 0 ];
 then
-    echo [provision]: Extracting FDO thirdparty libs
-    tar -zxf /mapguide_sources/fdo_rdbms_thirdparty.tar.gz -C ~
+    if [ $HAVE_FDO_LIBS -eq 0 ];
+    then
+        echo [provision]: Extracting FDO thirdparty libs
+        tar -zxf /mapguide_sources/fdo_rdbms_thirdparty.tar.gz -C ~
+    fi
+    if [ $HAVE_FDO -eq 0 ];
+    then
+        echo [provision]: Extracting FDO working copy
+        mkdir -p $FDO_SRC_ROOT
+        tar -zxf /mapguide_sources/$FDO_TARBALL -C $FDO_SRC_ROOT
+    fi
 fi
-if [ $HAVE_FDO -eq 0 ];
-then
-    echo [provision]: Extracting FDO working copy
-    mkdir -p $FDO_SRC_ROOT
-    tar -zxf /mapguide_sources/$FDO_TARBALL -C $FDO_SRC_ROOT
-fi
 if [ $HAVE_MAPGUIDE -eq 0 ];
 then
     echo [provision]: Extracting MapGuide working copy
     mkdir -p $MG_SRC_ROOT
     tar -zxf /mapguide_sources/$MG_TARBALL -C $MG_SRC_ROOT
 fi
-echo [provision]: svn update FDO
-BUILD_COMPONENT="svn update FDO"
-# Only for this VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
-#svn upgrade $FDO_SRC
-svn update $FDO_SRC
-check_build
+if [ $HAVE_FDO_SDK -eq 0 ];
+then
+    echo [provision]: svn update FDO
+    BUILD_COMPONENT="svn update FDO"
+    # Only for Ubuntu 14.04 VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
+    #svn upgrade $FDO_SRC
+    svn update $FDO_SRC
+    check_build
+else
+    echo [provision]: Using FDO SDK. No svn update of source required.
+fi
 echo [provision]: svn update MapGuide
 BUILD_COMPONENT="svn update MapGuide"
-# Only for this VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
+# Only for Ubuntu 14.04 VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
 #svn upgrade $MG_SRC
 svn update $MG_SRC
 check_build
-if [ -d /mapguide_sources/patches/fdo ];
+if [ $HAVE_FDO_SDK -eq 0 ];
 then
-    echo [provision]: Applying FDO source patches
-    cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+    if [ -d /mapguide_sources/patches/fdo ];
+    then
+        echo [provision]: Applying FDO source patches
+        cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+    fi
+else
+    echo [provision]: Using FDO SDK. No source patches to apply
 fi
 if [ -d /mapguide_sources/patches/mapguide ];
 then
@@ -229,60 +278,93 @@
 echo [provision]: Making sure swig is executable
 chmod +x $MG_SRC/Oem/SWIGEx/Linux/swig
 cd ~/scripts
-BUILD_COMPONENT="FDO"
-sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
-check_build
+if [ $HAVE_FDO_SDK -eq 0 ];
+then
+    BUILD_COMPONENT="FDO"
+    sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
+    check_build
+    FDO_REV=`svn info $FDO_SRC | perl revnum.pl`
+else
+    echo [provision]: Using FDO SDK. Not building from source
+    echo [provision]: Re-packaging FDO SDK r$FDO_REV as debs
+    FDO_FILELIST=$FDO_SDK_PKG_PATH/filelist
+    pushd $FDO_SDK_PKG_PATH
+    ./dpkgfdo.sh amd64 $FDO_REV 2>&1 | tee ~/dpkg_fdo.log
+    popd
+fi
 BUILD_COMPONENT="MapGuide"
 sudo -E ./build.sh 2>&1 | tee ~/mapguide_build.log
 check_build
-FDO_REV=`svn info $FDO_SRC | perl revnum.pl`
 MG_REV=`svn info $MG_SRC | perl revnum.pl`
 BUILD_COMPONENT="MapGuide deb packages"
-sudo ./dpkgmapguide.sh amd64 $MG_REV
+./dpkgmapguide.sh amd64 $MG_REV 2>&1 | tee ~/dpkg_mapguide.log
 check_build
 > ~/unit_test_status.log
 if [ $FDO_UNIT_TEST -eq 1 ];
 then
+    export NLSPATH=/usr/local/fdo-${FDO_VER_FULL}/nls/%N
     echo [provision]: Unit test FDO
     BUILD_COMPONENT="Unit Test FDO Core"
     cd $SCRIPT_ROOT/fdo_build_area/Fdo/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SHP Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SHP/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SDF Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SDF/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SQLite Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SQLite/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test GDAL Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/GDAL/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test WMS Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/WMS/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
     check_test
 fi
 if [ $MG_UNIT_TEST -eq 1 ];
 then
     echo [provision]: Unit test MapGuide
     BUILD_COMPONENT="Unit Test MapGuide Server"
-    cd $SCRIPT_ROOT/mgdev
-    sudo make check 2>&1 | tee ~/mapguide_unit_test.log
-    check_test
+    # HACK: Tile and Resource Service tests are known to freeze our VMs when driven by vagrant (why? who knows? 
+    # All we know is that those tests involve threads)
+    # So test everything *but* the above services. If required, this can be tested under a manually controlled
+    # VM
+    #
+    # build the individual targets that would comprise "make check" sans execution of unittest.sh
+    cd $SCRIPT_ROOT/mgdev/Server/src/UnitTesting
+    sudo make libMgUnitTesting.la
+    cd $SCRIPT_ROOT/mgdev/Server/src/Core
+    sudo make unittest.sh
+    # Run the test suites individually except for TileService for reasons already stated
+    for comp in CoordinateSystem FeatureService Geometry KmlService LogManager MdfModel Misc RenderingService ServerAdminService ServerManager ServiceManager SiteManager SiteService ProfilingService TransformMesh
+    do
+        sudo -E ./mgserver test $comp UnitTestResults_${comp}.xml 2>&1 | tee ~/mapguide_${comp}_unit_test.log
+        check_test
+        if [ -f UnitTestResults_${comp}.xml ]; then
+            sudo mv UnitTestResults_${comp}.xml ~/UnitTestResults_${comp}.xml
+        fi
+    done
 fi
 cd $SCRIPT_ROOT
 sudo mkdir -p /vagrant/build
 sudo mv -f ~/*.log /vagrant/build
-sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
+if [ $HAVE_FDO_SDK -eq 0 ];
+then
+    sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
+    sudo cp ~/fdo_*_unit_test.log /vagrant/build
+else
+    sudo cp $FDO_SDK_PKG_PATH/bin/*.deb /vagrant/build
+fi
 sudo cp bin/*.deb /vagrant/build
-sudo cp ~/unit_test_status.log /vagrant/build/unit_test_status.log
+sudo cp ~/UnitTestResults_*.xml /vagrant/build
 sudo cp /vagrant/mginstallubuntu.sh /vagrant/build/mginstallubuntu.sh
 sudo sed -i 's/FDOBUILD=0/FDOBUILD='"$FDO_REV"'/g' /vagrant/build/mginstallubuntu.sh
 sudo sed -i 's/MGBUILD=0/MGBUILD='"$MG_REV"'/g' /vagrant/build/mginstallubuntu.sh

Modified: branches/2.6/vagrant/ubuntu/x86/Vagrantfile
===================================================================
--- branches/2.6/vagrant/ubuntu/x86/Vagrantfile	2014-05-24 11:38:30 UTC (rev 8155)
+++ branches/2.6/vagrant/ubuntu/x86/Vagrantfile	2014-05-26 07:31:30 UTC (rev 8156)
@@ -140,12 +140,14 @@
 HAVE_FDO=0
 HAVE_FDO_LIBS=0
 HAVE_MAPGUIDE=0
-MG_UNIT_TEST=0
-FDO_UNIT_TEST=0
+MG_UNIT_TEST=1
+FDO_UNIT_TEST=1
 SCRIPT_ROOT=~/scripts
 FDO_SRC_ROOT=~/fdo/branches
 FDO_VER_MM=3.9
+FDO_VER_FULL=${FDO_VER_MM}.0
 MG_VER_MM=2.6
+MG_VER_FULL=${MG_VER_MM}.0
 FDO_SRC_DIR=3.9
 FDO_SRC=$FDO_SRC_ROOT/$FDO_SRC_DIR
 FDO_LIB_SRC=~/fdo_rdbms_thirdparty
@@ -153,6 +155,12 @@
 MG_SRC=$MG_SRC_ROOT/MgDev
 FDO_TARBALL=fdo-checkout-3.9.tar.gz
 MG_TARBALL=mapguide-checkout-2.6.tar.gz
+
+HAVE_FDO_SDK=0
+FDO_SDK_PKG_PATH=~/fdosdk
+FDO_SDK_TARBALL=
+FDO_INST=/usr/local/fdo-${FDO_VER_FULL}
+
 if [ -d $FDO_SRC ]; 
 then
     HAVE_FDO=1
@@ -165,6 +173,19 @@
 then
     HAVE_MAPGUIDE=1
 fi
+if [ -f /mapguide_sources/fdosdk_filename ] && [ -f /mapguide_sources/fdosdk_rev ] && [ -d /mapguide_sources/filelist ];
+then
+    FDO_SDK_TARBALL=`cat /mapguide_sources/fdosdk_filename`
+    FDO_REV=`cat /mapguide_sources/fdosdk_rev`
+    if [ -f /mapguide_sources/$FDO_SDK_TARBALL ];
+    then
+        sudo mkdir -p ${FDO_INST}
+        sudo tar -zxf /mapguide_sources/$FDO_SDK_TARBALL -C ${FDO_INST}
+        HAVE_FDO_SDK=1
+        FDO_UNIT_TEST=0
+        echo [provision]: Using FDO SDK. Not building from source. Not running FDO unit tests.
+    fi
+fi
 if [ -f /usr/include/asm/atomic.h ];
 then
     echo [provision]: atomic.h exists. Doing nothing
@@ -175,10 +196,25 @@
 fi
 #echo [provision]: Checking libraries
 #sudo apt-get install -y libpq-dev libmysqlclient-dev
+echo [provision]: Clean line endings
+sudo dos2unix /vagrant/*.sh
+sudo dos2unix /vagrant/*.pl
+sudo dos2unix /vagrant/*.txt
 echo [provision]: Copying shell scripts
 mkdir -p $SCRIPT_ROOT
+if [ $HAVE_FDO_SDK -eq 1 ];
+then
+    echo [provision]: Prepare package build area for FDO SDK
+    mkdir -p $FDO_SDK_PKG_PATH
+    cp -R /mapguide_sources/filelist $FDO_SDK_PKG_PATH
+    cp -f /vagrant/dpkgfdo.sh $FDO_SDK_PKG_PATH
+    cp -f /vagrant/dpkgfdocore.sh $FDO_SDK_PKG_PATH
+    cp -f /vagrant/dpkgfdoprovider.sh $FDO_SDK_PKG_PATH
+    cp -f /vagrant/revnum.pl $FDO_SDK_PKG_PATH
+fi
 cp -f /vagrant/*.sh $SCRIPT_ROOT
 cp -f /vagrant/*.pl $SCRIPT_ROOT
+cp -f /vagrant/*.txt $SCRIPT_ROOT
 echo [provision]: Flip Ubuntu switch
 cd $SCRIPT_ROOT
 sed -i 's/UBUNTU=0/UBUNTU=1/g' build.sh
@@ -187,39 +223,52 @@
 sed -i 's/FDO_CPU=x64/FDO_CPU=x86/g' build_fdo.sh
 sed -i 's/FDO_BUILD_CPU=amd64/FDO_BUILD_CPU=i386/g' build_fdo.sh
 sed -i 's/LIB_DIRNAME=lib64/LIB_DIRNAME=lib/g' build_fdo.sh
-if [ $HAVE_FDO_LIBS -eq 0 ];
+if [ $HAVE_FDO_SDK -eq 0 ];
 then
-    echo [provision]: Extracting FDO thirdparty libs
-    tar -zxf /mapguide_sources/fdo_rdbms_thirdparty.tar.gz -C ~
+    if [ $HAVE_FDO_LIBS -eq 0 ];
+    then
+        echo [provision]: Extracting FDO thirdparty libs
+        tar -zxf /mapguide_sources/fdo_rdbms_thirdparty.tar.gz -C ~
+    fi
+    if [ $HAVE_FDO -eq 0 ];
+    then
+        echo [provision]: Extracting FDO working copy
+        mkdir -p $FDO_SRC_ROOT
+        tar -zxf /mapguide_sources/$FDO_TARBALL -C $FDO_SRC_ROOT
+    fi
 fi
-if [ $HAVE_FDO -eq 0 ];
-then
-    echo [provision]: Extracting FDO working copy
-    mkdir -p $FDO_SRC_ROOT
-    tar -zxf /mapguide_sources/$FDO_TARBALL -C $FDO_SRC_ROOT
-fi
 if [ $HAVE_MAPGUIDE -eq 0 ];
 then
     echo [provision]: Extracting MapGuide working copy
     mkdir -p $MG_SRC_ROOT
     tar -zxf /mapguide_sources/$MG_TARBALL -C $MG_SRC_ROOT
 fi
-echo [provision]: svn update FDO
-BUILD_COMPONENT="svn update FDO"
-# Only for Ubuntu 14.04 VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
-#svn upgrade $FDO_SRC
-svn update $FDO_SRC
-check_build
+if [ $HAVE_FDO_SDK -eq 0 ];
+then
+    echo [provision]: svn update FDO
+    BUILD_COMPONENT="svn update FDO"
+    # Only for Ubuntu 14.04 VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
+    #svn upgrade $FDO_SRC
+    svn update $FDO_SRC
+    check_build
+else
+    echo [provision]: Using FDO SDK. No svn update of source required.
+fi
 echo [provision]: svn update MapGuide
 BUILD_COMPONENT="svn update MapGuide"
 # Only for Ubuntu 14.04 VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
 #svn upgrade $MG_SRC
 svn update $MG_SRC
 check_build
-if [ -d /mapguide_sources/patches/fdo ];
+if [ $HAVE_FDO_SDK -eq 0 ];
 then
-    echo [provision]: Applying FDO source patches
-    cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+    if [ -d /mapguide_sources/patches/fdo ];
+    then
+        echo [provision]: Applying FDO source patches
+        cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+    fi
+else
+    echo [provision]: Using FDO SDK. No source patches to apply
 fi
 if [ -d /mapguide_sources/patches/mapguide ];
 then
@@ -229,60 +278,93 @@
 echo [provision]: Making sure swig is executable
 chmod +x $MG_SRC/Oem/SWIGEx/Linux/swig
 cd ~/scripts
-BUILD_COMPONENT="FDO"
-sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
-check_build
+if [ $HAVE_FDO_SDK -eq 0 ];
+then
+    BUILD_COMPONENT="FDO"
+    sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
+    check_build
+    FDO_REV=`svn info $FDO_SRC | perl revnum.pl`
+else
+    echo [provision]: Using FDO SDK. Not building from source
+    echo [provision]: Re-packaging FDO SDK r$FDO_REV as debs
+    FDO_FILELIST=$FDO_SDK_PKG_PATH/filelist
+    pushd $FDO_SDK_PKG_PATH
+    ./dpkgfdo.sh i386 $FDO_REV 2>&1 | tee ~/dpkg_fdo.log
+    popd
+fi
 BUILD_COMPONENT="MapGuide"
 sudo -E ./build.sh 2>&1 | tee ~/mapguide_build.log
 check_build
-FDO_REV=`svn info $FDO_SRC | perl revnum.pl`
 MG_REV=`svn info $MG_SRC | perl revnum.pl`
 BUILD_COMPONENT="MapGuide deb packages"
-sudo ./dpkgmapguide.sh i386 $MG_REV
+./dpkgmapguide.sh i386 $MG_REV 2>&1 | tee ~/dpkg_mapguide.log
 check_build
 > ~/unit_test_status.log
 if [ $FDO_UNIT_TEST -eq 1 ];
 then
+    export NLSPATH=/usr/local/fdo-${FDO_VER_FULL}/nls/%N
     echo [provision]: Unit test FDO
     BUILD_COMPONENT="Unit Test FDO Core"
     cd $SCRIPT_ROOT/fdo_build_area/Fdo/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_core_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SHP Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SHP/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_shp_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SDF Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SDF/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sdf_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test SQLite Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/SQLite/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_sqlite_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test GDAL Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/GDAL/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_gdal_unit_test.log
     check_test
     BUILD_COMPONENT="Unit Test WMS Provider"
     cd $SCRIPT_ROOT/fdo_build_area/Providers/WMS/Src/UnitTest
-    sudo ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
+    sudo -E ./UnitTest 2>&1 | tee ~/fdo_wms_unit_test.log
     check_test
 fi
 if [ $MG_UNIT_TEST -eq 1 ];
 then
     echo [provision]: Unit test MapGuide
     BUILD_COMPONENT="Unit Test MapGuide Server"
-    cd $SCRIPT_ROOT/mgdev
-    sudo make check 2>&1 | tee ~/mapguide_unit_test.log
-    check_test
+    # HACK: Tile and Resource Service tests are known to freeze our VMs when driven by vagrant (why? who knows? 
+    # All we know is that those tests involve threads)
+    # So test everything *but* the above services. If required, this can be tested under a manually controlled
+    # VM
+    #
+    # build the individual targets that would comprise "make check" sans execution of unittest.sh
+    cd $SCRIPT_ROOT/mgdev/Server/src/UnitTesting
+    sudo make libMgUnitTesting.la
+    cd $SCRIPT_ROOT/mgdev/Server/src/Core
+    sudo make unittest.sh
+    # Run the test suites individually except for TileService for reasons already stated
+    for comp in CoordinateSystem FeatureService Geometry KmlService LogManager MdfModel Misc RenderingService ServerAdminService ServerManager ServiceManager SiteManager SiteService ProfilingService TransformMesh
+    do
+        sudo -E ./mgserver test $comp UnitTestResults_${comp}.xml 2>&1 | tee ~/mapguide_${comp}_unit_test.log
+        check_test
+        if [ -f UnitTestResults_${comp}.xml ]; then
+            sudo mv UnitTestResults_${comp}.xml ~/UnitTestResults_${comp}.xml
+        fi
+    done
 fi
 cd $SCRIPT_ROOT
 sudo mkdir -p /vagrant/build
 sudo mv -f ~/*.log /vagrant/build
-sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
+if [ $HAVE_FDO_SDK -eq 0 ];
+then
+    sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
+    sudo cp ~/fdo_*_unit_test.log /vagrant/build
+else
+    sudo cp $FDO_SDK_PKG_PATH/bin/*.deb /vagrant/build
+fi
 sudo cp bin/*.deb /vagrant/build
-sudo cp ~/unit_test_status.log /vagrant/build/unit_test_status.log
+sudo cp ~/UnitTestResults_*.xml /vagrant/build
 sudo cp /vagrant/mginstallubuntu.sh /vagrant/build/mginstallubuntu.sh
 sudo sed -i 's/FDOBUILD=0/FDOBUILD='"$FDO_REV"'/g' /vagrant/build/mginstallubuntu.sh
 sudo sed -i 's/MGBUILD=0/MGBUILD='"$MG_REV"'/g' /vagrant/build/mginstallubuntu.sh



More information about the mapguide-commits mailing list