Bug 1187706 part 1: Switch B2G builds to in tree mozharness. r=garndt
authorWander Lairson Costa <wcosta@mozilla.com>
Sun, 26 Jul 2015 15:58:57 -0300
changeset 286385 19002d887cb41b9c777e6c53c7cf017f30bd0505
parent 286384 d576f2cec511a21fef54b61c54b69d5e5d5fc992
child 286386 9a290ce57a780a03ccfbb89bd0dfa88d424ebb68
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgarndt
bugs1187706
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1187706 part 1: Switch B2G builds to in tree mozharness. r=garndt Mozharness now lives inside gecko tree, so switch B2G builds to use it.
testing/taskcluster/scripts/builder/build-emulator-x86.sh
testing/taskcluster/scripts/builder/build-emulator.sh
testing/taskcluster/scripts/phone-builder/build-phone-ota.sh
testing/taskcluster/scripts/phone-builder/build-phone.sh
testing/taskcluster/scripts/phone-builder/pre-build.sh
--- a/testing/taskcluster/scripts/builder/build-emulator-x86.sh
+++ b/testing/taskcluster/scripts/builder/build-emulator-x86.sh
@@ -6,44 +6,38 @@ PATH=$DIRNAME:$PATH
 
 WORKSPACE=$1
 
 ### Check that require variables are defined
 test -d $WORKSPACE
 test $GECKO_HEAD_REPOSITORY # Should be an hg repository url to pull from
 test $GECKO_BASE_REPOSITORY # Should be an hg repository url to clone from
 test $GECKO_HEAD_REV # Should be an hg revision to pull down
-test $MOZHARNESS_REPOSITORY # mozharness repository
-test $MOZHARNESS_REV # mozharness revision
 test $TARGET
 
 . setup-ccache.sh
 
-tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV
-
 # Figure out where the remote manifest is so we can use caches for it.
 
-if [ -z "$MANIFEST" ]; then
-  MANIFEST="$WORKSPACE/gecko/b2g/config/$TARGET/sources.xml"
-fi
+MANIFEST=${MANIFEST:="$WORKSPACE/gecko/b2g/config/$TARGET/sources.xml"}
 
 tc-vcs repo-checkout $WORKSPACE/B2G https://git.mozilla.org/b2g/B2G.git $MANIFEST
 
 # Ensure symlink has been created to gecko...
 rm -f $WORKSPACE/B2G/gecko
 ln -s $WORKSPACE/gecko $WORKSPACE/B2G/gecko
 
 debug_flag=""
 if [ 0$B2G_DEBUG -ne 0 ]; then
   debug_flag='--debug'
 fi
 
 rm -rf $WORKSPACE/B2G/out/target/product/generic_x86/tests/
 
-./mozharness/scripts/b2g_build.py \
+$WORKSPACE/gecko/testing/mozharness/scripts/b2g_build.py \
   --config b2g/taskcluster-emulator.py \
   "$debug_flag" \
   --disable-mock \
   --work-dir=$WORKSPACE/B2G \
   --log-level=debug \
   --target=$TARGET \
   --b2g-config-dir=$TARGET \
   --checkout-revision=$GECKO_HEAD_REV \
--- a/testing/taskcluster/scripts/builder/build-emulator.sh
+++ b/testing/taskcluster/scripts/builder/build-emulator.sh
@@ -6,30 +6,20 @@ PATH=$DIRNAME:$PATH
 
 WORKSPACE=$1
 
 ### Check that require variables are defined
 test -d $WORKSPACE
 test $GECKO_HEAD_REPOSITORY # Should be an hg repository url to pull from
 test $GECKO_BASE_REPOSITORY # Should be an hg repository url to clone from
 test $GECKO_HEAD_REV # Should be an hg revision to pull down
-test $MOZHARNESS_REPOSITORY # mozharness repository
-test $MOZHARNESS_REV # mozharness revision
-test $MOZHARNESS_REF # mozharness ref
 test $TARGET
 
 . setup-ccache.sh
 
-# First check if the mozharness directory is available. This is intended to be
-# used locally in development to test mozharness changes:
-#
-#   $ docker -v your_mozharness:/home/worker/mozharness ...
-#
-tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV $MOZHARNESS_REF
-
 # Figure out where the remote manifest is so we can use caches for it.
 
 if [ -z "$MANIFEST" ]; then
   MANIFEST="$WORKSPACE/gecko/b2g/config/$TARGET/sources.xml"
 fi
 
 tc-vcs repo-checkout $WORKSPACE/B2G https://git.mozilla.org/b2g/B2G.git $MANIFEST
 
@@ -39,17 +29,17 @@ ln -s $WORKSPACE/gecko $WORKSPACE/B2G/ge
 
 debug_flag=""
 if [ 0$B2G_DEBUG -ne 0 ]; then
   debug_flag='--debug'
 fi
 
 rm -rf $WORKSPACE/B2G/out/target/product/generic/tests/
 
-./mozharness/scripts/b2g_build.py \
+$WORKSPACE/gecko/testing/mozharness/scripts/b2g_build.py \
   --config b2g/taskcluster-emulator.py \
   "$debug_flag" \
   --disable-mock \
   --work-dir=$WORKSPACE/B2G \
   --log-level=debug \
   --target=$TARGET \
   --b2g-config-dir=$TARGET \
   --checkout-revision=$GECKO_HEAD_REV \
--- a/testing/taskcluster/scripts/phone-builder/build-phone-ota.sh
+++ b/testing/taskcluster/scripts/phone-builder/build-phone-ota.sh
@@ -15,28 +15,23 @@ mar_file=b2g-$PLATFORM-gecko-update.mar
 
 # We need different platform names for each variant (user, userdebug and
 # eng). We do not append variant suffix for "user" to keep compability with
 # verions already installed in the phones.
 if [ 0$DOGFOOD -ne 1 -a $VARIANT != "user" ]; then
   PLATFORM=$PLATFORM-$VARIANT
 fi
 
-if ! test $MOZHARNESS_CONFIG; then
-  MOZHARNESS_CONFIG=b2g/taskcluster-phone-ota.py
-fi
-
-if ! test $BALROG_SERVER_CONFIG; then
-  BALROG_SERVER_CONFIG=balrog/docker-worker.py
-fi
+MOZHARNESS_CONFIG=${MOZHARNESS_CONFIG:=b2g/taskcluster-phone-ota.py}
+BALROG_SERVER_CONFIG=${BALROG_SERVER_CONFIG:=balrog/docker-worker.py}
 
 rm -rf $WORKSPACE/B2G/upload-public/
 rm -rf $WORKSPACE/B2G/upload/
 
-./mozharness/scripts/b2g_build.py \
+$WORKSPACE/gecko/testing/mozharness/scripts/b2g_build.py \
   --config $MOZHARNESS_CONFIG \
   --config $BALROG_SERVER_CONFIG \
   "$debug_flag" \
   --disable-mock \
   --variant=$VARIANT \
   --work-dir=$WORKSPACE/B2G \
   --gaia-languages-file locales/languages_all.json \
   --log-level=debug \
--- a/testing/taskcluster/scripts/phone-builder/build-phone.sh
+++ b/testing/taskcluster/scripts/phone-builder/build-phone.sh
@@ -3,23 +3,21 @@
 . pre-build.sh
 
 if [ $TARGET == "aries" -o $TARGET == "shinano" ]; then
   # caching objects might be dangerous for some devices (aka aries)
   rm -rf $WORKSPACE/B2G/objdir*
   rm -rf $WORKSPACE/B2G/out
 fi
 
-if ! test $MOZHARNESS_CONFIG; then
-  MOZHARNESS_CONFIG=b2g/taskcluster-phone.py
-fi
+MOZHARNESS_CONFIG=${MOZHARNESS_CONFIG:=b2g/taskcluster-phone.py}
 
 rm -rf $WORKSPACE/B2G/upload/
 
-./mozharness/scripts/b2g_build.py \
+$WORKSPACE/gecko/testing/mozharness/scripts/b2g_build.py \
   --config $MOZHARNESS_CONFIG \
   "$debug_flag" \
   --disable-mock \
   --variant=$VARIANT \
   --work-dir=$WORKSPACE/B2G \
   --gaia-languages-file locales/languages_all.json \
   --log-level=debug \
   --target=$TARGET \
--- a/testing/taskcluster/scripts/phone-builder/pre-build.sh
+++ b/testing/taskcluster/scripts/phone-builder/pre-build.sh
@@ -6,26 +6,21 @@ PATH=$DIRNAME:$PATH
 
 WORKSPACE=$1
 
 ### Check that require variables are defined
 test -d $WORKSPACE
 test $GECKO_HEAD_REPOSITORY # Should be an hg repository url to pull from
 test $GECKO_BASE_REPOSITORY # Should be an hg repository url to clone from
 test $GECKO_HEAD_REV # Should be an hg revision to pull down
-test $MOZHARNESS_REPOSITORY # mozharness repository
-test $MOZHARNESS_REV # mozharness revision
-test $MOZHARNESS_REF # mozharness ref
 test $TARGET
 test $VARIANT
 
 . ../builder/setup-ccache.sh
 
-tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV $MOZHARNESS_REF
-
 # Figure out where the remote manifest is so we can use caches for it.
 MANIFEST=$(repository-url.py $GECKO_HEAD_REPOSITORY $GECKO_HEAD_REV b2g/config/$TARGET/sources.xml)
 tc-vcs repo-checkout $WORKSPACE/B2G https://git.mozilla.org/b2g/B2G.git $MANIFEST
 
 # Ensure symlink has been created to gecko...
 rm -f $WORKSPACE/B2G/gecko
 ln -s $WORKSPACE/gecko $WORKSPACE/B2G/gecko