From 0978a8ec1d10754385a33f5ae8118b311866b2e8 Mon Sep 17 00:00:00 2001 From: Stefano Mazzocchi Date: Wed, 7 Apr 2010 00:12:40 +0000 Subject: [PATCH] make things more solid for snow-leopard git-svn-id: http://google-refine.googlecode.com/svn/trunk@400 7d457c2a-affb-35e4-300a-418c747d4874 --- build.xml | 2 ++ gridworks | 40 +++++++++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/build.xml b/build.xml index 7bda83c6e..70e50c8cb 100644 --- a/build.xml +++ b/build.xml @@ -27,6 +27,7 @@ + @@ -257,6 +258,7 @@ + diff --git a/gridworks b/gridworks index fde70b616..814c25c42 100755 --- a/gridworks +++ b/gridworks @@ -219,14 +219,7 @@ findbugs_prepare() { FINDBUGS_FILE=`echo $FINDBUGS_URL | sed 's|.*/||'` FINDBUGS_DIR="findbugs-1.3.9" - cd $GRIDWORKS_TOOLS_DIR - if [ ! -f "$FINDBUGS_FILE" ] ; then - download $FINDBUGS_URL $FINDBUGS_FILE - fi - if [ ! -d "$FINDBUGS_DIR" ] ; then - tar xzf $FINDBUGS_FILE || exit 1 - fi - cd .. + tool_download $FINDBUGS_URL $FINDBUGS_FILE $FINDBUGS_DIR } # ---------------------------------------------------------------------------------------------- @@ -289,17 +282,22 @@ mac_dist() { get_revision ANT_PARAMS="-Djarbundler.dir=${GRIDWORKS_TOOLS_DIR}/${JARBUNDLER_DIR}" - ant mac + ant mac || exit 1 mkdir -p "$GRIDWORKS_BUILD_DIR/mac/.background" cp src/graphics/dmg_background/dmg_background.png "$GRIDWORKS_BUILD_DIR/mac/.background/dmg_background.png" SIZE=30 + if [ -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" ] ; then + rm "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" + fi + TITLE="Gridworks $VERSION" echo "Building MacOSX DMG for $TITLE" - hdiutil create -srcfolder "$GRIDWORKS_BUILD_DIR/mac" -volname "$TITLE" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}m "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" - hdiutil attach -readwrite -noverify -noautoopen "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" + hdiutil create -srcfolder "$GRIDWORKS_BUILD_DIR/mac" -volname "$TITLE" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}m "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" || error "can't create empty DMG" + DEVICE=`hdiutil attach -readwrite -noverify -noautoopen "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" | egrep '^/dev/' | sed 1q | awk '{print $1}'` + hdiutil attach "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" echo ' tell application "Finder" @@ -319,20 +317,30 @@ mac_dist() { close open update without registering applications - delay 2 + delay 2 eject end tell end tell - ' | osascript + ' | osascript || error "error running applescript" sync sync - hdiutil convert "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" -format UDZO -imagekey zlib-level=9 -o "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" - hdiutil internet-enable -yes "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" + hdiutil detach $DEVICE + hdiutil convert "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" -format UDZO -imagekey zlib-level=9 -o "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" || error "Error compressing DMG" + hdiutil internet-enable -yes "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" || error "Error internet-enabling DMG" rm -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" } test() { + ui_test $1 + server_test $1 +} + +ui_test() { + windmill_prepare +} + +server_test() { if [ ! -d $GRIDWORKS_TEST_DIR/classes ] ; then ant build_tests echo "" @@ -529,6 +537,8 @@ case "$ACTION" in clean) ant clean;; distclean) ant distclean;; test) test $1;; + ui_test) ui_test $1;; + server_test) server_test $1;; findbugs) findbugs;; run) run;; execute) execute $*;;