sync w/ trunk fitness_build
authorJiri Rechtacek <jrechtacek@netbeans.org>
Wed, 30 May 2012 15:53:37 +0200
branchfitness_build
changeset 2324849b00fca152d1
parent 230257 7024f0b0e115
parent 232483 78e783dbae2d
child 232485 8c343c856ed4
sync w/ trunk
nbbuild/newbuild/trunk-nightly.sh
     1.1 --- a/installer/mac/newbuild/build.sh	Wed May 30 06:15:58 2012 -0700
     1.2 +++ b/installer/mac/newbuild/build.sh	Wed May 30 15:53:37 2012 +0200
     1.3 @@ -22,11 +22,12 @@
     1.4  echo Given parameters: $1 $2 $3 $4 $5 $5
     1.5  
     1.6  if [ -z "$1" ] || [ -z "$2" ]|| [ -z "$3" ] || [ -z "$4" ] || [ -z "$5" ]; then
     1.7 -    echo "usage: $0 zipdir prefix buildnumber ml_build build_jdk7 [nb_locales]"
     1.8 +    echo "usage: $0 zipdir prefix buildnumber en_build ml_build build_jdk7 [nb_locales]"
     1.9      echo ""
    1.10      echo "zipdir is the dir which contains the zip/modulclusters and zip-ml/moduleclusters"
    1.11      echo "prefix is the distro filename prefix, e.g. netbeans-hudson-trunk in netbeans-hudson-trunk-2464"
    1.12      echo "buildnumber is the distro buildnumber, e.g. 2464 in netbeans-hudson-trunk-2464"
    1.13 +    echo "en_build is 1 if en builds are required and 0 if not"
    1.14      echo "ml_build is 1 if ml builds are required and 0 if not"
    1.15      echo "build_jdk7 is 1 if bundle jdk7 are required and 0 if not"
    1.16      echo "nb_locales is the string with the list of locales (for ml builds)"
    1.17 @@ -36,14 +37,14 @@
    1.18  work_dir=$1
    1.19  prefix=$2
    1.20  buildnumber=$3
    1.21 -ml_build=$4
    1.22 -build_jdk7=$5
    1.23 -if [ -n "$6" ] ; then
    1.24 -  nb_locales="$6"
    1.25 +en_build=$4
    1.26 +ml_build=$5
    1.27 +build_jdk7=$6
    1.28 +if [ -n "$7" ] ; then
    1.29 +  nb_locales="$7"
    1.30  fi
    1.31  
    1.32  basename=`dirname "$0"`
    1.33 -. "$basename"/build-private.sh
    1.34  
    1.35  cd "$basename"
    1.36  chmod -R a+x *.sh
    1.37 @@ -56,12 +57,18 @@
    1.38      target="build-jdk-bundle-dmg"
    1.39  fi
    1.40  
    1.41 -ant -f $basename/build.xml $target -Dcommon.name=$commonname -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='false' -Dbuild.jdk7=$build_jdk7 -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    1.42 +if [ -z $en_build ] ; then
    1.43 +    en_build=1
    1.44 +fi
    1.45  
    1.46  rm -rf "$basename"/dist_en
    1.47 -mv -f "$basename"/dist "$basename"/dist_en
    1.48 +if [ 1 -eq $en_build ] ; then
    1.49 +    ant -f $basename/build.xml $target -Dcommon.name=$commonname -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='false' -Dbuild.jdk7=$build_jdk7 -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    1.50 +    mv -f "$basename"/dist "$basename"/dist_en
    1.51 +fi
    1.52 +
    1.53  
    1.54  if [ 1 -eq $ml_build ] ; then
    1.55 -commonname_ml=$work_dir/zip-ml/moduleclusters/$prefix-$buildnumber
    1.56 -ant -f $basename/build.xml $target -Dnb.locales=$nb_locales -Dcommon.name=$commonname_ml -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='true' -Dbuild.jdk7=$build_jdk7 -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    1.57 +    commonname_ml=$work_dir/zip-ml/moduleclusters/$prefix-$buildnumber
    1.58 +    ant -f $basename/build.xml $target -Dnb.locales=$nb_locales -Dcommon.name=$commonname_ml -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='true' -Dbuild.jdk7=$build_jdk7 -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    1.59  fi
     2.1 --- a/nbbuild/newbuild/build-all-components.sh	Wed May 30 06:15:58 2012 -0700
     2.2 +++ b/nbbuild/newbuild/build-all-components.sh	Wed May 30 15:53:37 2012 +0200
     2.3 @@ -21,35 +21,35 @@
     2.4  mkdir -p nbbuild/netbeans
     2.5  
     2.6  #Build source packages
     2.7 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml -Dmerge.dependent.modules=false -Dcluster.config=full build-source-config
     2.8 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml -Dmerge.dependent.modules=false -Dcluster.config=full build-source-config" "Build source packages"
     2.9  ERROR_CODE=$?
    2.10  
    2.11  create_test_result "build.source.package" "Build Source package" $ERROR_CODE
    2.12  if [ $ERROR_CODE != 0 ]; then
    2.13 -    echo "ERROR: $ERROR_CODE - Can't build all source package"
    2.14 +    echo "ERROR: $ERROR_CODE - Cannot build all source package"
    2.15  #    exit $ERROR_CODE;
    2.16  else
    2.17      mv nbbuild/build/*-src-* $DIST/zip/$BASENAME-src.zip
    2.18  fi
    2.19  
    2.20 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml -Dmerge.dependent.modules=false -Dcluster.config=platform build-source-config
    2.21 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml -Dmerge.dependent.modules=false -Dcluster.config=platform build-source-config"
    2.22  ERROR_CODE=$?
    2.23  
    2.24  create_test_result "build.source.platform" "Build Platform Source package" $ERROR_CODE
    2.25  if [ $ERROR_CODE != 0 ]; then
    2.26 -    echo "ERROR: $ERROR_CODE - Can't build basic platform source package"
    2.27 +    echo "ERROR: $ERROR_CODE - Cannot build basic platform source package"
    2.28  #    exit $ERROR_CODE;
    2.29  else
    2.30      mv nbbuild/build/*-src-* $DIST/zip/$BASENAME-platform-src.zip
    2.31  fi
    2.32  
    2.33  #Build the NB IDE first - no validation tests!
    2.34 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml build-nozip -Dbuild.compiler.debuglevel=source,lines,vars
    2.35 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml build-nozip -Dbuild.compiler.debuglevel=source,lines,vars" "Build the NB IDE first - no validation tests!"
    2.36  ERROR_CODE=$?
    2.37  
    2.38  create_test_result "build.IDE" "Build IDE" $ERROR_CODE
    2.39  if [ $ERROR_CODE != 0 ]; then
    2.40 -    echo "ERROR: $ERROR_CODE - Can't build IDE"
    2.41 +    echo "ERROR: $ERROR_CODE - Cannot build IDE"
    2.42      exit $ERROR_CODE;
    2.43  fi
    2.44  
    2.45 @@ -60,7 +60,7 @@
    2.46  # Different JDK for tests because JVM crashes often (see 6598709, 6607038)
    2.47  JDK_TESTS=$JDK_HOME
    2.48  # standard NetBeans unit and UI validation tests
    2.49 -ant -v -f nbbuild/build.xml -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER commit-validation
    2.50 +run_and_measure "ant -v -f nbbuild/build.xml -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER commit-validation" "standard NetBeans unit and UI validation tests"
    2.51  ERROR_CODE=$?
    2.52  
    2.53  create_test_result "test.commit-validation" "Commit Validation" $ERROR_CODE
    2.54 @@ -84,7 +84,7 @@
    2.55  rm -rf $NB_ALL/nbbuild/netbeans/nb/servicetag
    2.56  rm -rf $NB_ALL/nbbuild/netbeans/enterprise/config/GlassFishEE6
    2.57  
    2.58 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml build-test-dist -Dtest.fail.on.error=false
    2.59 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml build-test-dist -Dtest.fail.on.error=false"
    2.60  ERROR_CODE=$?
    2.61  
    2.62  create_test_result "build.test.dist" "Build Test Distribution" $ERROR_CODE
    2.63 @@ -98,111 +98,119 @@
    2.64  cd $NB_ALL
    2.65  
    2.66  #Build JNLP
    2.67 -ant -Djnlp.codebase=http://bits.netbeans.org/dev/jnlp/ -Djnlp.signjar.keystore=$KEYSTORE -Djnlp.signjar.alias=nb_ide -Djnlp.signjar.password=$STOREPASS -Djnlp.dest.dir=${DIST}/jnlp build-jnlp
    2.68 -ERROR_CODE=$?
    2.69 +#run_and_measure "ant -Djnlp.codebase=http://bits.netbeans.org/dev/jnlp/ -Djnlp.signjar.keystore=$KEYSTORE -Djnlp.signjar.alias=nb_ide -Djnlp.signjar.password=$STOREPASS -Djnlp.dest.dir=${DIST}/jnlp build-jnlp" "Build JNLP"
    2.70 +#ERROR_CODE=$?
    2.71  
    2.72 -create_test_result "build.jnlp" "Build JNLP" $ERROR_CODE
    2.73 -if [ $ERROR_CODE != 0 ]; then
    2.74 -    echo "ERROR: $ERROR_CODE - Can't build JNLP"
    2.75 -#    exit $ERROR_CODE;
    2.76 -fi
    2.77 +#create_test_result "build.jnlp" "Build JNLP" $ERROR_CODE
    2.78 +#if [ $ERROR_CODE != 0 ]; then
    2.79 +#    echo "ERROR: $ERROR_CODE - Cannot build JNLP"
    2.80 +##    exit $ERROR_CODE;
    2.81 +#fi
    2.82  
    2.83  #Build all NBMs for stable UC - IDE + UC-only
    2.84 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml build-nbms -Dcluster.config=stableuc -Dbase.nbm.target.dir=${DIST}/uc2 -Dkeystore=$KEYSTORE -Dstorepass=$STOREPASS -Dbuild.compiler.debuglevel=source,lines
    2.85 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/build.xml build-nbms -Dcluster.config=stableuc -Dbase.nbm.target.dir=${DIST}/uc2 -Dkeystore=$KEYSTORE -Dstorepass=$STOREPASS -Dbuild.compiler.debuglevel=source,lines" "Build all NBMs for stable UC - IDE + UC-only"
    2.86  ERROR_CODE=$?
    2.87  
    2.88  create_test_result "build.NBMs" "Build all NBMs" $ERROR_CODE
    2.89  if [ $ERROR_CODE != 0 ]; then
    2.90 -    echo "ERROR: $ERROR_CODE - Can't build all stable UC NBMs"
    2.91 +    echo "ERROR: $ERROR_CODE - Cannot build all stable UC NBMs"
    2.92  #    exit $ERROR_CODE;
    2.93  fi
    2.94  
    2.95  # Separate IDE nbms from stableuc nbms.
    2.96 -ant -f nbbuild/build.xml move-ide-nbms -Dnbms.source.location=${DIST}/uc2 -Dnbms.target.location=${DIST}/uc
    2.97 +run_and_measure "ant -f nbbuild/build.xml move-ide-nbms -Dnbms.source.location=${DIST}/uc2 -Dnbms.target.location=${DIST}/uc" "Separate IDE nbms from stableuc nbms."
    2.98  ERROR_CODE=$?
    2.99  
   2.100  create_test_result "get.ide.NBMs" "Extract IDE NBMs from all the built NBMs" $ERROR_CODE
   2.101  if [ $ERROR_CODE != 0 ]; then
   2.102 -    echo "ERROR: $ERROR_CODE - Can't extract IDE NBMs"
   2.103 +    echo "ERROR: $ERROR_CODE - Cannot extract IDE NBMs"
   2.104  #    exit $ERROR_CODE;
   2.105  fi
   2.106  
   2.107  
   2.108  #Build 110n kit for HG files
   2.109 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml hg-l10n-kit -Dl10n.kit=${DIST}/zip/hg-l10n-$BUILDNUMBER.zip
   2.110 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml hg-l10n-kit -Dl10n.kit=${DIST}/zip/hg-l10n-$BUILDNUMBER.zip" "Build 110n kit for HG files"
   2.111  ERROR_CODE=$?
   2.112  
   2.113  create_test_result "build.hg.l10n" "Build 110n kit for HG files" $ERROR_CODE
   2.114  if [ $ERROR_CODE != 0 ]; then
   2.115 -    echo "ERROR: $ERROR_CODE - Can't build l10n kits for HG files"
   2.116 +    echo "ERROR: $ERROR_CODE - Cannot build l10n kits for HG files"
   2.117  #    exit $ERROR_CODE;
   2.118  fi
   2.119  
   2.120  #Build l10n kit for IDE modules
   2.121 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml l10n-kit -Dnbms.location=${DIST}/uc -Dl10n.kit=${DIST}/zip/ide-l10n-$BUILDNUMBER.zip
   2.122 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml l10n-kit -Dnbms.location=${DIST}/uc -Dl10n.kit=${DIST}/zip/ide-l10n-$BUILDNUMBER.zip" "Build l10n kit for IDE modules"
   2.123  ERROR_CODE=$?
   2.124  
   2.125  create_test_result "build.modules.l10n" "Build l10n kit for IDE modules" $ERROR_CODE
   2.126  if [ $ERROR_CODE != 0 ]; then
   2.127 -    echo "ERROR: $ERROR_CODE - Can't build l10n kits for IDE modules"
   2.128 +    echo "ERROR: $ERROR_CODE - Cannot build l10n kits for IDE modules"
   2.129  #    exit $ERROR_CODE;
   2.130  fi
   2.131  
   2.132  #Build l10n kit for stable uc modules
   2.133 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml l10n-kit -Dnbms.location=${DIST}/uc2 -Dl10n.kit=${DIST}/zip/stableuc-l10n-$BUILDNUMBER.zip
   2.134 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml l10n-kit -Dnbms.location=${DIST}/uc2 -Dl10n.kit=${DIST}/zip/stableuc-l10n-$BUILDNUMBER.zip"
   2.135  ERROR_CODE=$?
   2.136  
   2.137  create_test_result "build.modules.l10n" "Build l10n kit for stable uc modules" $ERROR_CODE
   2.138  if [ $ERROR_CODE != 0 ]; then
   2.139 -    echo "ERROR: $ERROR_CODE - Can't build l10n kits for stable uc modules"
   2.140 +    echo "ERROR: $ERROR_CODE - Cannot build l10n kits for stable uc modules"
   2.141  #    exit $ERROR_CODE;
   2.142  fi
   2.143  
   2.144  cd nbbuild
   2.145 -Build catalog for IDE NBMs
   2.146 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/uc -Dcatalog.file=${DIST}/uc/catalog.xml
   2.147 +#Build catalog for IDE NBMs
   2.148 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/uc -Dcatalog.file=${DIST}/uc/catalog.xml" "Build catalog for IDE NBMs"
   2.149  ERROR_CODE=$?
   2.150  
   2.151  create_test_result "build.ide.catalog" "Build UC catalog for IDE modules" $ERROR_CODE
   2.152  if [ $ERROR_CODE != 0 ]; then
   2.153 -    echo "ERROR: $ERROR_CODE - Can't build UC catalog for IDE module"
   2.154 +    echo "ERROR: $ERROR_CODE - Cannot build UC catalog for IDE module"
   2.155  #    exit $ERROR_CODE;
   2.156  fi
   2.157  
   2.158 -Build catalog for Stable UC NBMs
   2.159 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/uc2 -Dcatalog.file=${DIST}/uc2/catalog.xml
   2.160 +#Build catalog for Stable UC NBMs
   2.161 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/uc2 -Dcatalog.file=${DIST}/uc2/catalog.xml" "Build catalog for Stable UC NBMs"
   2.162  ERROR_CODE=$?
   2.163  
   2.164  create_test_result "build.stableuc.catalog" "Build UC catalog for stable UC modules" $ERROR_CODE
   2.165  if [ $ERROR_CODE != 0 ]; then
   2.166 -    echo "ERROR: $ERROR_CODE - Can't build UC catalog for stable UC modules"
   2.167 +    echo "ERROR: $ERROR_CODE - Cannot build UC catalog for stable UC modules"
   2.168  #    exit $ERROR_CODE;
   2.169  fi
   2.170  cd ..
   2.171  
   2.172 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/javadoctools/build.xml build-javadoc
   2.173 -ERROR_CODE=$?
   2.174 +#run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f nbbuild/javadoctools/build.xml build-javadoc"
   2.175 +#ERROR_CODE=$?
   2.176  
   2.177 -create_test_result "build.javadoc" "Build javadoc" $ERROR_CODE
   2.178 -if [ $ERROR_CODE != 0 ]; then
   2.179 -    echo "ERROR: $ERROR_CODE - Building of Javadoc Distrubution failed"
   2.180 -#    exit $ERROR_CODE;
   2.181 -else
   2.182 -    mv nbbuild/NetBeans-*-javadoc.zip $DIST/zip/$BASENAME-javadoc.zip
   2.183 -    cp -r nbbuild/build/javadoc $DIST/
   2.184 -fi
   2.185 +#create_test_result "build.javadoc" "Build javadoc" $ERROR_CODE
   2.186 +#if [ $ERROR_CODE != 0 ]; then
   2.187 +#    echo "ERROR: $ERROR_CODE - Building of Javadoc Distrubution failed"
   2.188 +##    exit $ERROR_CODE;
   2.189 +#else
   2.190 +#    mv nbbuild/NetBeans-*-javadoc.zip $DIST/zip/$BASENAME-javadoc.zip
   2.191 +#    cp -r nbbuild/build/javadoc $DIST/
   2.192 +#fi
   2.193  
   2.194  #ML_BUILD
   2.195  if [ $ML_BUILD == 1 ]; then
   2.196      cd $NB_ALL
   2.197 -    hg clone -r $L10N_BRANCH $ML_REPO $NB_ALL/l10n
   2.198 +    if [ -d $NB_ALL/l10n/.hg ] ; then
   2.199 +        cd $NB_ALL/l10n
   2.200 +        run_and_measure "hg pull"
   2.201 +        run_and_measure "hg update --clean --rev $L10N_BRANCH"
   2.202 +    else
   2.203 +        rm -Rf $NB_ALL/l10n
   2.204 +        run_and_measure "hg clone --rev $L10N_BRANCH $ML_REPO l10n"
   2.205 +    fi
   2.206 +    
   2.207      cd $NB_ALL/l10n
   2.208 -    ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml -Dlocales=$LOCALES -Ddist.dir=$NB_ALL/nbbuild/netbeans-ml -Dnbms.dir=${DIST}/uc -Dnbms.dist.dir=${DIST}/ml/uc -Dkeystore=$KEYSTORE -Dstorepass=$STOREPASS build
   2.209 +    run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml -Dlocales=$LOCALES -Ddist.dir=$NB_ALL/nbbuild/netbeans-ml -Dnbms.dir=${DIST}/uc -Dnbms.dist.dir=${DIST}/ml/uc -Dkeystore=$KEYSTORE -Dstorepass=$STOREPASS build"
   2.210      ERROR_CODE=$?
   2.211  
   2.212      create_test_result "build.ML.IDE" "Build ML IDE" $ERROR_CODE
   2.213      if [ $ERROR_CODE != 0 ]; then
   2.214 -        echo "ERROR: $ERROR_CODE - Can't build ML IDE"
   2.215 +        echo "ERROR: $ERROR_CODE - Cannot build ML IDE"
   2.216  #        exit $ERROR_CODE;
   2.217      fi
   2.218  
   2.219 @@ -211,7 +219,7 @@
   2.220  #    create_test_result "build.ML.stableuc" "Build ML Stable UC modules" $ERROR_CODE
   2.221  #    ERROR_CODE=$?
   2.222  #    if [ $ERROR_CODE != 0 ]; then
   2.223 -#        echo "ERROR: $ERROR_CODE - Can't build ML Stable UC modules"
   2.224 +#        echo "ERROR: $ERROR_CODE - Cannot build ML Stable UC modules"
   2.225  #        exit $ERROR_CODE;
   2.226  #    fi
   2.227  
   2.228 @@ -223,12 +231,12 @@
   2.229  
   2.230      cd $NB_ALL/nbbuild
   2.231      #Build catalog for ML FU NBMs
   2.232 -    ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/ml/uc -Dcatalog.file=${DIST}/ml/uc/catalog.xml
   2.233 +    run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/ml/uc -Dcatalog.file=${DIST}/ml/uc/catalog.xml"
   2.234      ERROR_CODE=$?
   2.235  
   2.236      create_test_result "build.ML.FU.catalog" "Build ML FU catalog" $ERROR_CODE
   2.237      if [ $ERROR_CODE != 0 ]; then
   2.238 -        echo "ERROR: $ERROR_CODE - Can't build catalog FU for ML NBMs"
   2.239 +        echo "ERROR: $ERROR_CODE - Cannot build catalog FU for ML NBMs"
   2.240      #    exit $ERROR_CODE;
   2.241      fi
   2.242  
   2.243 @@ -238,11 +246,11 @@
   2.244  #    ERROR_CODE=$?
   2.245  
   2.246  #    if [ $ERROR_CODE != 0 ]; then
   2.247 -#        echo "ERROR: $ERROR_CODE - Can't build stable UC catalog for ML NBMs"
   2.248 +#        echo "ERROR: $ERROR_CODE - Cannot build stable UC catalog for ML NBMs"
   2.249      #    exit $ERROR_CODE;
   2.250  #    fi
   2.251  
   2.252 -    cp -r $NB_ALL/nbbuild/netbeans/* $NB_ALL/nbbuild/netbeans-ml/
   2.253 +    run_and_measure "cp -r $NB_ALL/nbbuild/netbeans/* $NB_ALL/nbbuild/netbeans-ml/"
   2.254  
   2.255      cd $NB_ALL/nbbuild
   2.256      #Remove the build helper files
   2.257 @@ -331,12 +339,12 @@
   2.258  fi
   2.259  
   2.260  #Build catalog for FU NBMs
   2.261 -ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/uc -Dcatalog.file=${DIST}/uc/catalog.xml
   2.262 +run_and_measure "ant -Dbuildnum=$BUILDNUM -Dbuildnumber=$BUILDNUMBER -f build.xml generate-uc-catalog -Dnbms.location=${DIST}/uc -Dcatalog.file=${DIST}/uc/catalog.xml" "Build catalog for FU NBMs"
   2.263  ERROR_CODE=$?
   2.264  
   2.265  create_test_result "build.FU.catalog" "Build catalog FU modules" $ERROR_CODE
   2.266  if [ $ERROR_CODE != 0 ]; then
   2.267 -    echo "ERROR: $ERROR_CODE - Can't build catalog FU for NBMs"
   2.268 +    echo "ERROR: $ERROR_CODE - Cannot build catalog FU for NBMs"
   2.269  #    exit $ERROR_CODE;
   2.270  fi
   2.271  
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/nbbuild/newbuild/build-mac-nbi.sh	Wed May 30 15:53:37 2012 +0200
     3.3 @@ -0,0 +1,98 @@
     3.4 +#!/bin/bash
     3.5 +set -x
     3.6 +
     3.7 +if [ ! -z $TIP ] ; then
     3.8 +    echo Update to $TIP
     3.9 +    hg up --rev $TIP
    3.10 +fi
    3.11 +
    3.12 +DIRNAME=`dirname $0`
    3.13 +cd ${DIRNAME}
    3.14 +SCRIPTS_DIR=`pwd`
    3.15 +source init.sh
    3.16 +
    3.17 +if [ -z $BUILD_NBJDK7 ]; then
    3.18 +    BUILD_NBJDK7=0
    3.19 +fi
    3.20 +
    3.21 +# Run new builds
    3.22 +sh $NB_ALL/installer/mac/newbuild/init.sh
    3.23 +sh $NB_ALL/installer/mac/newbuild/build.sh $MAC_PATH $BASENAME_PREFIX $BUILDNUMBER $EN_BUILD $ML_BUILD $BUILD_NBJDK7 $LOCALES
    3.24 +ERROR_CODE=$?
    3.25 +
    3.26 +if [ $ERROR_CODE != 0 ]; then
    3.27 +    echo "ERROR: $ERROR_CODE - NBI installers build failed"
    3.28 +    exit $ERROR_CODE;
    3.29 +fi
    3.30 +
    3.31 +if [ 1 -eq $EN_BUILD ] || [ -z $EN_BUILD ] ; then
    3.32 +    cp -r $WORKSPACE/installer/mac/newbuild/dist_en/* $DIST/bundles
    3.33 +    ERROR_CODE=$?
    3.34 +    if [ $ERROR_CODE != 0 ]; then
    3.35 +        echo "ERROR: $ERROR_CODE - Cannot copy installers"
    3.36 +        exit $ERROR_CODE;
    3.37 +    fi
    3.38 +fi
    3.39 +if [ 1 -eq $ML_BUILD ] ; then
    3.40 +    cp -r $WORKSPACE/installer/mac/newbuild/dist/* $DIST/ml/bundles
    3.41 +    ERROR_CODE=$?
    3.42 +    if [ $ERROR_CODE != 0 ]; then
    3.43 +        echo "ERROR: $ERROR_CODE - Cannot copy installers"
    3.44 +        exit $ERROR_CODE;
    3.45 +    fi
    3.46 +fi
    3.47 +
    3.48 +###################################################################
    3.49 +#
    3.50 +# Sign Windows ML installers
    3.51 +#
    3.52 +###################################################################
    3.53 +
    3.54 +if [ -z $DONT_SIGN_INSTALLER ]; then
    3.55 +
    3.56 +    if [ -z $SIGN_CLIENT ]; then
    3.57 +        echo "ERROR: SIGN_CLIENT not defined - Signing failed"
    3.58 +        exit 1;
    3.59 +    fi
    3.60 +
    3.61 +    if [ -z $SIGN_USR ]; then
    3.62 +        echo "ERROR: SIGN_USR not defined - Signing failed"
    3.63 +        exit 1;
    3.64 +    fi
    3.65 +
    3.66 +    if [ -z $SIGN_PASS ]; then
    3.67 +        echo "ERROR: SIGN_PASS not defined - Signing failed"
    3.68 +        exit 1;
    3.69 +    fi
    3.70 +
    3.71 +    find $DIST/ml/bundles -name "netbeans-*-windows.exe" | xargs -t -I [] java -Xmx2048m -jar $SIGN_CLIENT/Client.jar -file_to_sign [] -user $SIGN_USR -pass $SIGN_PASS -signed_location $DIST/ml/bundles -sign_method microsoft
    3.72 +    ERROR_CODE=$?
    3.73 +
    3.74 +    if [ $ERROR_CODE != 0 ]; then
    3.75 +        echo "ERROR: $ERROR_CODE - Signing failed"
    3.76 +        exit $ERROR_CODE;
    3.77 +    fi
    3.78 +
    3.79 +fi
    3.80 +
    3.81 +if [ 1 -eq $EN_BUILD ] || [ -z $EN_BUILD ] ; then
    3.82 +    cd $DIST
    3.83 +    #bash ${SCRIPTS_DIR}/files-info.sh bundles bundles/jdk zip zip/moduleclusters
    3.84 +    bash ${SCRIPTS_DIR}/files-info.sh bundles bundles/jdk
    3.85 +    ERROR_CODE=$?
    3.86 +    if [ $ERROR_CODE != 0 ]; then
    3.87 +        echo "ERROR: $ERROR_CODE - Counting of MD5 sums and size failed"
    3.88 +    #    exit $ERROR_CODE;
    3.89 +    fi
    3.90 +fi
    3.91 +
    3.92 +if [ $ML_BUILD == 1 ]; then
    3.93 +    cd $DIST/ml
    3.94 +    #bash ${SCRIPTS_DIR}/files-info.sh bundles zip zip/moduleclusters
    3.95 +    bash ${SCRIPTS_DIR}/files-info.sh bundles
    3.96 +    ERROR_CODE=$?
    3.97 +    if [ $ERROR_CODE != 0 ]; then
    3.98 +        echo "ERROR: $ERROR_CODE - Counting of MD5 sums and size failed"
    3.99 +#        exit $ERROR_CODE;
   3.100 +    fi
   3.101 +fi
     4.1 --- a/nbbuild/newbuild/build-nbi.sh	Wed May 30 06:15:58 2012 -0700
     4.2 +++ b/nbbuild/newbuild/build-nbi.sh	Wed May 30 15:53:37 2012 +0200
     4.3 @@ -40,12 +40,10 @@
     4.4         exit $ERROR_CODE;
     4.5     fi
     4.6     ssh $NATIVE_MAC_MACHINE mkdir -p $MAC_PATH/zip/moduleclusters
     4.7 -#   scp -q -v $DIST/zip/$BASENAME*.zip $NATIVE_MAC_MACHINE:$MAC_PATH/zip
     4.8     ls $DIST/zip/moduleclusters | grep -v "all-in-one" | xargs -I {} scp -q -v $DIST/zip/moduleclusters/{} $NATIVE_MAC_MACHINE:$MAC_PATH/zip/moduleclusters/
     4.9     if [ 1 -eq $ML_BUILD ] ; then
    4.10          ssh $NATIVE_MAC_MACHINE rm -rf $MAC_PATH/zip-ml/*      
    4.11          ssh $NATIVE_MAC_MACHINE mkdir -p $MAC_PATH/zip-ml/moduleclusters
    4.12 -	#scp -q -v $DIST/ml/zip/$BASENAME*.zip $NATIVE_MAC_MACHINE:$MAC_PATH/zip-ml
    4.13          ls $DIST/ml/zip/moduleclusters | grep -v "all-in-one" | xargs -I {} scp -q -v $DIST/ml/zip/moduleclusters/{} $NATIVE_MAC_MACHINE:$MAC_PATH/zip-ml/moduleclusters/
    4.14     fi
    4.15     ERROR_CODE=$?
    4.16 @@ -53,19 +51,18 @@
    4.17         echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't put the zips"
    4.18         exit $ERROR_CODE;
    4.19     fi
    4.20 -#   ssh $NATIVE_MAC_MACHINE $MAC_PATH/run-mac-installer.sh $ML_BUILD > $MAC_LOG 2>&1 &
    4.21  
    4.22  # Run new builds
    4.23     sh $NB_ALL/installer/mac/newbuild/init.sh | ssh $NATIVE_MAC_MACHINE "cat > $MAC_PATH/installer/mac/newbuild/build-private.sh"
    4.24     ssh $NATIVE_MAC_MACHINE chmod a+x $MAC_PATH/installer/mac/newbuild/build.sh
    4.25  
    4.26 -   ssh $NATIVE_MAC_MACHINE $MAC_PATH/installer/mac/newbuild/build.sh $MAC_PATH $BASENAME_PREFIX $BUILDNUMBER $ML_BUILD $BUILD_NBJDK7 $LOCALES > $MAC_LOG_NEW 2>&1 &
    4.27 +   ssh $NATIVE_MAC_MACHINE $MAC_PATH/installer/mac/newbuild/build.sh $MAC_PATH $BASENAME_PREFIX $BUILDNUMBER $EN_BUILD $ML_BUILD $BUILD_NBJDK7 $LOCALES > $MAC_LOG_NEW 2>&1 &
    4.28  
    4.29  fi
    4.30  
    4.31  cd $NB_ALL/installer/infra/build
    4.32  
    4.33 -bash build.sh
    4.34 +run_and_measure "bash build.sh"
    4.35  ERROR_CODE=$?
    4.36  
    4.37  if [ $ERROR_CODE != 0 ]; then
    4.38 @@ -107,14 +104,16 @@
    4.39      if [ $IS_NEW_MAC_FAILED -eq 0 ] && [ $IS_NEW_MAC_CONNECT -eq 0 ]; then
    4.40          #copy the bits back
    4.41          mkdir -p $DIST/bundles
    4.42 -        scp -r $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist_en/* $DIST/bundles
    4.43 -        ERROR_CODE=$?
    4.44 -        if [ $ERROR_CODE != 0 ]; then
    4.45 -            echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't get installers"
    4.46 -            exit $ERROR_CODE;
    4.47 +        if [ 1 -eq $EN_BUILD ] || [ -z $EN_BUILD ] ; then
    4.48 +            run_and_measure "scp -r $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist_en/* $DIST/bundles" "copy the bits back EN"
    4.49 +            ERROR_CODE=$?
    4.50 +            if [ $ERROR_CODE != 0 ]; then
    4.51 +                echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't get installers"
    4.52 +                exit $ERROR_CODE;
    4.53 +            fi
    4.54          fi
    4.55  	if [ 1 -eq $ML_BUILD ] ; then
    4.56 -		scp -r $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist/* $DIST/ml/bundles
    4.57 +		run_and_measure "scp -r $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist/* $DIST/ml/bundles" "copy the bits back ML"
    4.58                  ERROR_CODE=$?
    4.59                  if [ $ERROR_CODE != 0 ]; then
    4.60                      echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't get ml installers"
    4.61 @@ -162,7 +161,7 @@
    4.62  fi
    4.63  
    4.64  cd $DIST
    4.65 -bash ${SCRIPTS_DIR}/files-info.sh bundles bundles/jdk zip zip/moduleclusters
    4.66 +run_and_measure "bash ${SCRIPTS_DIR}/files-info.sh bundles bundles/jdk zip zip/moduleclusters"
    4.67  ERROR_CODE=$?
    4.68  if [ $ERROR_CODE != 0 ]; then
    4.69      echo "ERROR: $ERROR_CODE - Counting of MD5 sums and size failed"
    4.70 @@ -171,7 +170,7 @@
    4.71  
    4.72  if [ $ML_BUILD == 1 ]; then
    4.73      cd $DIST/ml
    4.74 -    bash ${SCRIPTS_DIR}/files-info.sh bundles zip zip/moduleclusters
    4.75 +    run_and_measure "bash ${SCRIPTS_DIR}/files-info.sh bundles zip zip/moduleclusters"
    4.76      ERROR_CODE=$?
    4.77      if [ $ERROR_CODE != 0 ]; then
    4.78          echo "ERROR: $ERROR_CODE - Counting of MD5 sums and size failed"
     5.1 --- a/nbbuild/newbuild/init.sh	Wed May 30 06:15:58 2012 -0700
     5.2 +++ b/nbbuild/newbuild/init.sh	Wed May 30 15:53:37 2012 +0200
     5.3 @@ -46,10 +46,14 @@
     5.4      export RUNJAVAFX=0
     5.5  fi
     5.6  
     5.7 -#ML BUILD yes/no 1/0
     5.8 +#ML_BUILD yes/no 1/0
     5.9  if [ -z ${ML_BUILD} ]; then
    5.10      export ML_BUILD=1
    5.11  fi
    5.12 +#EN_BUILD yes/no 1/0
    5.13 +if [ -z ${EN_BUILD} ]; then
    5.14 +    export EN_BUILD=1
    5.15 +fi
    5.16  if [ -z ${LOCALES} ]; then
    5.17      export LOCALES=ja,zh_CN,pt_BR,ru
    5.18  fi
     6.1 --- a/nbbuild/newbuild/trunk-nightly.sh	Wed May 30 06:15:58 2012 -0700
     6.2 +++ b/nbbuild/newbuild/trunk-nightly.sh	Wed May 30 15:53:37 2012 +0200
     6.3 @@ -1,7 +1,7 @@
     6.4  #!/bin/bash
     6.5  set -x
     6.6  
     6.7 -#Initialize basic scructure
     6.8 +#Initialize basic structure
     6.9  DIRNAME=`dirname $0`
    6.10  cd ${DIRNAME}
    6.11  TRUNK_NIGHTLY_DIRNAME=`pwd`
    6.12 @@ -10,19 +10,22 @@
    6.13  
    6.14  rm -rf $DIST
    6.15  
    6.16 -#if [ ! -z $WORKSPACE ]; then
    6.17 -    #I'm under hudson and have sources here, I need to clone them
    6.18 -    #Clean obsolete sources first
    6.19 -#    rm -rf $NB_ALL
    6.20 -#    hg clone -U $WORKSPACE $NB_ALL
    6.21 -#    hg -R $NB_ALL update $NB_BRANCH
    6.22 -#fi
    6.23 +if [ ! -z $WORKSPACE ]; then
    6.24 +#    #I'm under hudson and have sources here, I need to clone them
    6.25 +#    #Clean obsolete sources first
    6.26 +    run_and_measure "rm -rf $NB_ALL"
    6.27 +    run_and_measure "hg clone -U $WORKSPACE $NB_ALL"
    6.28 +    run_and_measure "hg -R $NB_ALL update $NB_BRANCH"
    6.29 +fi
    6.30 +TIP=`hg tip --template '{rev}'`
    6.31 +export TIP
    6.32  
    6.33  #if [ $ML_BUILD == 1 ]; then
    6.34  #    cd $NB_ALL
    6.35  #    hg clone $ML_REPO $NB_ALL/l10n
    6.36  #fi
    6.37  
    6.38 +
    6.39  ###################################################################
    6.40  #
    6.41  # Build all the components
    6.42 @@ -30,7 +33,7 @@
    6.43  ###################################################################
    6.44  
    6.45  cd $TRUNK_NIGHTLY_DIRNAME
    6.46 -bash build-all-components.sh
    6.47 +run_and_measure "bash build-all-components.sh" "build-all-components.sh in total"
    6.48  ERROR_CODE=$?
    6.49  
    6.50  if [ $ERROR_CODE != 0 ]; then
    6.51 @@ -45,7 +48,7 @@
    6.52  ###################################################################
    6.53  
    6.54  cd $TRUNK_NIGHTLY_DIRNAME
    6.55 -bash pack-all-components.sh
    6.56 +run_and_measure "bash pack-all-components.sh" "pack-all-components.sh in total"
    6.57  ERROR_CODE=$?
    6.58  
    6.59  if [ $ERROR_CODE != 0 ]; then
    6.60 @@ -61,7 +64,7 @@
    6.61  
    6.62  if [ -n $BUILD_ID ]; then
    6.63      mkdir -p $DIST_SERVER2/${BUILD_ID}
    6.64 -    cp -rp $DIST/*  $DIST_SERVER2/${BUILD_ID}
    6.65 +    run_and_measure "cp -rp $DIST/*  $DIST_SERVER2/${BUILD_ID}" "Deploy bits to the storage server"
    6.66      if [ -n "${TESTING_SCRIPT}" ]; then
    6.67          cd $NB_ALL
    6.68          TIP_REV=`hg tip --template "{node}"`
    6.69 @@ -70,18 +73,23 @@
    6.70      fi
    6.71  fi
    6.72  
    6.73 +run_and_measure
    6.74  if [ $UPLOAD_ML == 1 ]; then
    6.75      cp $DIST/zip/$BASENAME-platform-src.zip $DIST/ml/zip/
    6.76      cp $DIST/zip/$BASENAME-src.zip $DIST/ml/zip/
    6.77 -    cp $DIST/zip/$BASENAME-javadoc.zip $DIST/ml/zip/
    6.78 +#    cp $DIST/zip/$BASENAME-javadoc.zip $DIST/ml/zip/
    6.79      cp $DIST/zip/hg-l10n-$BUILDNUMBER.zip $DIST/ml/zip/
    6.80      cp $DIST/zip/ide-l10n-$BUILDNUMBER.zip $DIST/ml/zip/
    6.81      cp $DIST/zip/stable-UC-l10n-$BUILDNUMBER.zip $DIST/ml/zip/
    6.82      cp $DIST/zip/testdist-$BUILDNUMBER.zip $DIST/ml/zip/
    6.83  fi
    6.84 +run_and_measure
    6.85  
    6.86  cd $TRUNK_NIGHTLY_DIRNAME
    6.87 -bash build-nbi.sh
    6.88 +
    6.89 +wget --no-proxy http://localhost:8080/job/Fake-Fake/buildWithParameters?TIP=$TIP > /dev/null
    6.90 +
    6.91 +run_and_measure "bash build-nbi-generic.sh" "build-nbi-generic in total"
    6.92  ERROR_CODE=$?
    6.93  
    6.94  if [ $ERROR_CODE != 0 ]; then
    6.95 @@ -91,23 +99,20 @@
    6.96  
    6.97  if [ -n $BUILD_ID ]; then
    6.98      mkdir -p $DIST_SERVER2/${BUILD_ID}
    6.99 -    cp -rp $DIST/*  $DIST_SERVER2/${BUILD_ID}
   6.100 -    rm $DIST_SERVER2/latest.old
   6.101 -    mv $DIST_SERVER2/latest $DIST_SERVER2/latest.old
   6.102 +    run_and_measure "cp -rp $DIST/*  $DIST_SERVER2/${BUILD_ID}"
   6.103 +    run_and_measure "rm $DIST_SERVER2/latest.old"
   6.104 +    run_and_measure "mv $DIST_SERVER2/latest $DIST_SERVER2/latest.old"
   6.105      ln -s $DIST_SERVER2/${BUILD_ID} $DIST_SERVER2/latest
   6.106 -    if [ $UPLOAD_ML == 0 -a ML_BUILD != 0 ]; then
   6.107 -        rm -r $DIST/ml
   6.108 +    if [ $UPLOAD_ML == 0 -a $ML_BUILD != 0 ]; then
   6.109 +        run_and_measure "rm -r $DIST/ml"
   6.110      fi
   6.111  fi
   6.112  
   6.113 -if [ $UPLOAD_ML == 1 ]; then
   6.114 -    mv $DIST/jnlp $DIST/ml/
   6.115 -    mv $DIST/javadoc $DIST/ml/
   6.116 -fi
   6.117 +#if [ $UPLOAD_ML == 1 ]; then
   6.118 +#    run_and_measure "mv $DIST/jnlp $DIST/ml/"
   6.119 +#    run_and_measure "mv $DIST/javadoc $DIST/ml/"
   6.120 +#fi
   6.121  
   6.122  if [ -z $DIST_SERVER ]; then
   6.123      exit 0;
   6.124  fi
   6.125 -
   6.126 -cd $TRUNK_NIGHTLY_DIRNAME
   6.127 -bash upload-bits.sh