#1109 and #1041 Documentation corrections. First cut of buildserver/test_daily.sh script

This commit is contained in:
Robin Mills
2015-12-14 11:48:20 +00:00
parent 7642614181
commit 6e2c2e44ee
2 changed files with 78 additions and 7 deletions
+71
View File
@@ -0,0 +1,71 @@
#!/bin/bash
if [ -z "$JENKINS" ]; then export JENKINS=http://exiv2.dyndns.org:8080 ; fi
if [ -z "$DAILY" ]; then export DAILY=userContent/builds/Daily ; fi
##
# which PLATFORM
# JOB_NAME is defined when script is called by Jenkins
# example: JOB_NAME=trunk-cmake-daily/label=msvc
# PLATFORM must be defined as msvc when called from ssh
if [ ! -z "$JOB_NAME" ];then
PLATFORM=$(echo $JOB_NAME | cut -d= -f 2)
fi
if [ "$PLATFORM" == "" ]; then
export PLATFORM=''
if [ `uname` == Darwin ]; then
PLATFORM=macosx
elif [ `uname -o` == Cygwin ]; then
PLATFORM=cygwin
# tweak path to ensure the correct version of perl and expr for autotools
export "PATH=/bin:$PATH"
elif [ `uname -o` == Msys ]; then
PLATFORM=mingw
else
PLATFORM=linux
fi
fi
date=$(date '+%Y-%m-%d')
echo date = $date
echo url = $JENKINS/$DAILY
build=$(curl --silent $JENKINS/$DAILY/ \
|xmllint --pretty 1 - | grep $PLATFORM \
|grep $date | grep -v -e view | cut -d'"' -f 2 ) 2>/dev/null
echo build = $build
cd /tmp
rm -rf $build
curl -O --silent $JENKINS/$DAILY/$build
ls -alt $build
if [ -e dist ]; then rm -rf dist ;fi
##
# expand the bundle
tar xzf $build
if [ ! -e dist ]; then echo '*** no dist directory ***' ; exit 1; fi
# enter the dist and test it
cd dist
case $PLATFORM in
macosx)
# test the delivered exiv2
DYLD_LIBRARY_PATH="$PWD/$PLATFORM/lib:$DYLD_LIBRARY_PATH"
$PLATFORM/bin/exiv2 -vV | grep -e libexiv2 -e ^date -e ^bits -e ^version -e ^time
# compile, link and test the sample code
echo ''
g++ -I$PLATFORM/include -L$PLATFORM/lib samples/exifprint.cpp -lexiv2 -o exifprint
ls -alt exifprint
echo ''
exifprint --version | grep -e libexiv2 -e ^date -e ^bits -e ^version -e ^time
;;
*) echo unknown platform $platform
;;
esac
# That's all Folks!
##
+7 -7
View File
@@ -37,10 +37,10 @@ platform = macosx
Structure of the bundle:
dist/macosx/bin/exiv2.exe exiv2 and sample applications
.../lib/libexiv2.so.14.0.0.dylib shared library
/lib/exiv2.lib libraries for exiv2/expat/zlib
/include/exiv2/ include files
/share/ man pages
.../lib/libexiv2.so.14.0.0.dylib shared library
/lib/exiv2.lib libraries for exiv2/expat/zlib
/include/exiv2/ include files
/share/ man pages
dist/logs/ log files
dist/samples/exifprint.cpp sample code
@@ -109,9 +109,9 @@ c:\temp\dist> set "PATH=%CD%\2013\x64\dll\Release\bin;%PATH%"
c:\temp\dist> exiv2
To compile and link your own code:
Caution: You will need the same version of Visual Studio as the build
You will need to use "Visual Studio Command Prompt"
or initialize the DOS environment by calling vcvarsall.bat
Caution: You must use the same version of Visual Studio as the build
You will need to use the "Visual Studio Command Prompt"
or initialise the DOS environment by calling vcvarsall.bat
c:\temp> cd dist
c:\temp\dist> cl /EHsc -I2013\x64\dll\Release\include /MD samples\exifprint.cpp /link 2013\x64\dll\Release\lib\exiv2.lib