Bug 1245398 - Use in-tree script for all mulet tests; r=ahal
authorEdgar Chen <echen@mozilla.com>
Wed, 10 Feb 2016 18:12:02 +0800
changeset 283872 743e215cdb2cf8800e4a0cb77dfc9cb8a82c63bf
parent 283871 2ebbf6197fea27b6014ce74fcbd3a317d481162a
child 283873 47f2ca683d379b02fb55ecd6ded03f258436da66
push id71742
push userechen@mozilla.com
push dateThu, 11 Feb 2016 10:16:57 +0000
treeherdermozilla-inbound@743e215cdb2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1245398
milestone47.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 1245398 - Use in-tree script for all mulet tests; r=ahal MozReview-Commit-ID: AntB37HzGXa
testing/taskcluster/scripts/tester/test-mulet.sh
testing/taskcluster/tasks/tests/b2g_unittest_base.yml
testing/taskcluster/tasks/tests/mulet_build_test.yml
testing/taskcluster/tasks/tests/mulet_build_unit.yml
testing/taskcluster/tasks/tests/mulet_gaia_js_integration_tests.yml
testing/taskcluster/tasks/tests/mulet_gaia_unit.yml
testing/taskcluster/tasks/tests/mulet_gaia_unit_oop.yml
testing/taskcluster/tasks/tests/mulet_linter.yml
testing/taskcluster/tasks/tests/mulet_mochitests.yml
testing/taskcluster/tasks/tests/mulet_reftests.yml
--- a/testing/taskcluster/scripts/tester/test-mulet.sh
+++ b/testing/taskcluster/scripts/tester/test-mulet.sh
@@ -10,16 +10,17 @@ echo "running as" $(id)
 
 # Inputs, with defaults
 
 : MOZHARNESS_URL                ${MOZHARNESS_URL}
 : MOZHARNESS_SCRIPT             ${MOZHARNESS_SCRIPT}
 : MOZHARNESS_CONFIG             ${MOZHARNESS_CONFIG}
 : NEED_XVFB                     ${NEED_XVFB:=true}
 : NEED_PULSEAUDIO               ${NEED_PULSEAUDIO:=false}
+: NEED_PULL_GAIA                ${NEED_PULL_GAIA:=false}
 : SKIP_MOZHARNESS_RUN           ${SKIP_MOZHARNESS_RUN:=false}
 : WORKSPACE                     ${WORKSPACE:=/home/worker/workspace}
 : mozharness args               "${@}"
 
 set -v
 cd $WORKSPACE
 
 # test required parameters are supplied
@@ -74,26 +75,44 @@ if $NEED_XVFB; then
         else
             retry_count=$(($retry_count + 1))
             echo "Failed to start Xvfb, retry: $retry_count"
             sleep 2
         fi done
     if [ $xvfb_test == 255 ]; then exit 255; fi
 fi
 
+gaia_cmds=""
+if $NEED_PULL_GAIA; then
+    # test required parameters are supplied
+    if [[ -z ${GAIA_BASE_REPOSITORY} ]]; then exit 1; fi
+    if [[ -z ${GAIA_HEAD_REPOSITORY} ]]; then exit 1; fi
+    if [[ -z ${GAIA_REV} ]]; then exit 1; fi
+    if [[ -z ${GAIA_REF} ]]; then exit 1; fi
+
+    tc-vcs checkout \
+        ${WORKSPACE}/gaia \
+        ${GAIA_BASE_REPOSITORY} \
+        ${GAIA_HEAD_REPOSITORY} \
+        ${GAIA_REV} \
+        ${GAIA_REF}
+
+    gaia_cmds="--gaia-dir=${WORKSPACE}"
+fi
+
 # support multiple, space delimited, config files
 config_cmds=""
 for cfg in $MOZHARNESS_CONFIG; do
   config_cmds="${config_cmds} --config-file ${cfg}"
 done
 
 if [ ${SKIP_MOZHARNESS_RUN} == true ]; then
   # Skipping Mozharness is to allow the developer start the window manager
   # properly and letting them change the execution of Mozharness without
   # exiting the container
   echo "We skipped running Mozharness."
   echo "Make sure you export DISPLAY=:0 before calling Mozharness."
   echo "Don't forget to call it with 'sudo -E -u worker'."
 else
   # run the given mozharness script and configs, but pass the rest of the
   # arguments in from our own invocation
-  python2.7 $WORKSPACE/${MOZHARNESS_SCRIPT} ${config_cmds} "${@}"
+  python2.7 $WORKSPACE/${MOZHARNESS_SCRIPT} ${config_cmds} ${gaia_cmds} "${@}"
 fi
--- a/testing/taskcluster/tasks/tests/b2g_unittest_base.yml
+++ b/testing/taskcluster/tasks/tests/b2g_unittest_base.yml
@@ -12,12 +12,14 @@ task:
       # So pip installs are cached...
       level-{{level}}-{{project}}-dotcache: /home/worker/.cache
       level-{{level}}-{{project}}-tc-vcs: '/home/worker/.tc-vcs'
     capabilities:
       devices:
         loopbackVideo: true
         loopbackAudio: true
     env:
+      GECKO_HEAD_REPOSITORY: '{{{head_repository}}}'
+      GECKO_HEAD_REV: '{{{head_rev}}}'
       GAIA_HEAD_REPOSITORY: '{{{gaia_head_repository}}}'
       GAIA_BASE_REPOSITORY: '{{{gaia_base_repository}}}'
       GAIA_REF: '{{{gaia_ref}}}'
       GAIA_REV: '{{{gaia_rev}}}'
--- a/testing/taskcluster/tasks/tests/mulet_build_test.yml
+++ b/testing/taskcluster/tasks/tests/mulet_build_test.yml
@@ -2,28 +2,28 @@
 $inherits:
   from: 'tasks/tests/b2g_unittest_base.yml'
 task:
   metadata:
     name: '[TC] - Gaia Build Test'
     description: Gaia Build Test test run
 
   payload:
+    env:
+      NEED_XVFB: true
+      NEED_PULL_GAIA: true
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/gaia_build_integration.py'
+      MOZHARNESS_CONFIG: 'mozharness/configs/b2g/taskcluster_gaia_integration.py'
     command:
-      - entrypoint # entrypoint ensures we are running in xvfb
-      - ./bin/pull_gaia.sh &&
-      - >
-        python ./mozharness/scripts/gaia_build_integration.py
-        --application firefox
-        --config-file ./mozharness/configs/b2g/taskcluster_gaia_integration.py
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_url}}
-        --gaia-repo https://hg.mozilla.org/integration/gaia-central
-        --gaia-dir /home/worker
-        --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
+      - bash
+      - /home/worker/bin/test.sh
+      - --application=firefox
+      - --installer-url={{build_url}}
+      - --test-packages-url={{test_packages_url}}
+      - --xre-url=https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
   extra:
     treeherderEnv:
--- a/testing/taskcluster/tasks/tests/mulet_build_unit.yml
+++ b/testing/taskcluster/tasks/tests/mulet_build_unit.yml
@@ -2,27 +2,27 @@
 $inherits:
   from: 'tasks/tests/b2g_unittest_base.yml'
 task:
   metadata:
     name: '[TC] - Gaia Build Unit Test'
     description: Gaia Build Unit Test
 
   payload:
+    env:
+      NEED_XVFB: true
+      NEED_PULL_GAIA: true
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/gaia_build_unit.py'
+      MOZHARNESS_CONFIG: 'mozharness/configs/b2g/taskcluster_gaia_integration.py'
     command:
-      - entrypoint
-      - ./bin/pull_gaia.sh &&
-      - >
-        python ./mozharness/scripts/gaia_build_unit.py
-        --application firefox
-        --config-file ./mozharness/configs/b2g/taskcluster_gaia_integration.py
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_url}}
-        --gaia-repo https://hg.mozilla.org/integration/gaia-central
-        --gaia-dir /home/worker
+      - bash
+      - /home/worker/bin/test.sh
+      - --application=firefox
+      - --installer-url={{build_url}}
+      - --test-packages-url={{test_packages_url}}
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
   extra:
     treeherderEnv:
--- a/testing/taskcluster/tasks/tests/mulet_gaia_js_integration_tests.yml
+++ b/testing/taskcluster/tasks/tests/mulet_gaia_js_integration_tests.yml
@@ -3,29 +3,29 @@
   from: 'tasks/tests/b2g_unittest_base.yml'
 reruns: 3
 task:
   metadata:
     name: '[TC] Mulet Gaia JS Integration Test'
     description: Mulet Gaia JS Integration Test run {{chunk}}
 
   payload:
+    env:
+      NEED_XVFB: true
+      NEED_PULL_GAIA: true
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/gaia_integration.py'
+      MOZHARNESS_CONFIG: 'mozharness/configs/b2g/taskcluster_gaia_integration.py'
     command:
-      - entrypoint # entrypoint ensures we are running in xvfb
-      - ./bin/pull_gaia.sh &&
-      - >
-        python ./mozharness/scripts/gaia_integration.py
-        --application firefox
-        --config-file b2g/taskcluster_gaia_integration.py
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_url}}
-        --total-chunk {{total_chunks}}
-        --this-chunk {{chunk}}
-        --gaia-repo {{gaia_head_repository}}
-        --gaia-dir /home/worker
+      - bash
+      - /home/worker/bin/test.sh
+      - --application=firefox
+      - --installer-url={{build_url}}
+      - --test-packages-url={{test_packages_url}}
+      - --total-chunk={{total_chunks}}
+      - --this-chunk={{chunk}}
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
   extra:
     chunks:
--- a/testing/taskcluster/tasks/tests/mulet_gaia_unit.yml
+++ b/testing/taskcluster/tasks/tests/mulet_gaia_unit.yml
@@ -2,30 +2,30 @@
 $inherits:
   from: 'tasks/tests/b2g_unittest_base.yml'
 task:
   metadata:
     name: '[TC] Mulet Gaia Unit Test'
     description: Mulet Gaia Unit Test
 
   payload:
+    env:
+      NEED_XVFB: true
+      NEED_PULL_GAIA: true
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/gaia_unit.py'
+      MOZHARNESS_CONFIG: 'mozharness/configs/b2g/taskcluster_gaia_unit_production.py'
     command:
-      - entrypoint
-      - ./bin/pull_gaia.sh &&
-      - >
-        python ./mozharness/scripts/gaia_unit.py
-        --application firefox
-        --config-file b2g/taskcluster_gaia_unit_production.py
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_url}}
-        --gaia-repo {{gaia_head_repository}}
-        --gaia-dir /home/worker
-        --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
-        --total-chunk={{total_chunks}}
-        --this-chunk={{chunk}}
+      - bash
+      - /home/worker/bin/test.sh
+      - --application=firefox
+      - --installer-url={{build_url}}
+      - --test-packages-url={{test_packages_url}}
+      - --xre-url=https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
+      - --total-chunk={{total_chunks}}
+      - --this-chunk={{chunk}}
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
   extra:
     treeherderEnv:
--- a/testing/taskcluster/tasks/tests/mulet_gaia_unit_oop.yml
+++ b/testing/taskcluster/tasks/tests/mulet_gaia_unit_oop.yml
@@ -2,31 +2,31 @@
 $inherits:
   from: 'tasks/tests/b2g_unittest_base.yml'
 task:
   metadata:
     name: '[TC] Mulet Gaia Unit Test OOP'
     description: Mulet Gaia Unit Test OOP
 
   payload:
+    env:
+      NEED_XVFB: true
+      NEED_PULL_GAIA: true
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/gaia_unit.py'
+      MOZHARNESS_CONFIG: 'mozharness/configs/b2g/taskcluster_gaia_unit_production.py'
     command:
-      - entrypoint
-      - ./bin/pull_gaia.sh &&
-      - >
-        python ./mozharness/scripts/gaia_unit.py
-        --application firefox
-        --config-file b2g/taskcluster_gaia_unit_production.py
-        --browser-arg -oop
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_url}}
-        --gaia-repo {{gaia_head_repository}}
-        --gaia-dir /home/worker
-        --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
-        --total-chunk={{total_chunks}}
-        --this-chunk={{chunk}}
+      - bash
+      - /home/worker/bin/test.sh
+      - --application=firefox
+      - --browser-arg=-oop
+      - --installer-url={{build_url}}
+      - --test-packages-url={{test_packages_url}}
+      - --xre-url=https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
+      - --total-chunk={{total_chunks}}
+      - --this-chunk={{chunk}}
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
   extra:
     treeherderEnv:
--- a/testing/taskcluster/tasks/tests/mulet_linter.yml
+++ b/testing/taskcluster/tasks/tests/mulet_linter.yml
@@ -2,27 +2,27 @@
 $inherits:
   from: 'tasks/tests/b2g_unittest_base.yml'
 task:
   metadata:
     name: '[TC] - Gaia Linter'
     description: Linter Test
 
   payload:
+    env:
+      NEED_XVFB: true
+      NEED_PULL_GAIA: true
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/gaia_linter.py'
+      MOZHARNESS_CONFIG: 'mozharness/configs/b2g/taskcluster_gaia_integration.py'
     command:
-      - entrypoint
-      - ./bin/pull_gaia.sh &&
-      - >
-        python ./mozharness/scripts/gaia_linter.py
-        --application firefox
-        --config-file ./mozharness/configs/b2g/taskcluster_gaia_integration.py
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_url}}
-        --gaia-repo https://hg.mozilla.org/integration/gaia-central
-        --gaia-dir /home/worker
+      - bash
+      - /home/worker/bin/test.sh
+      - --application=firefox
+      - --installer-url={{build_url}}
+      - --test-packages-url={{test_packages_url}}
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
   extra:
     treeherderEnv:
--- a/testing/taskcluster/tasks/tests/mulet_mochitests.yml
+++ b/testing/taskcluster/tasks/tests/mulet_mochitests.yml
@@ -1,33 +1,18 @@
 ---
 $inherits:
-  from: 'tasks/test.yml'
+  from: 'tasks/tests/b2g_unittest_base.yml'
 task:
   metadata:
     name: '[TC] Mulet Mochitests ( {{chunk}} )'
     description: Mulet Mochitest run {{chunk}}
-  scopes:
-    - 'docker-worker:cache:level-{{level}}-{{project}}-tc-vcs'
-    - 'docker-worker:cache:level-{{level}}-{{project}}-dotcache'
-    - 'docker-worker:capability:device:loopbackVideo'
-    - 'docker-worker:capability:device:loopbackAudio'
+
   payload:
-    image: '{{#docker_image}}tester{{/docker_image}}'
-    cache:
-      # So pip installs are cached...
-      level-{{level}}-{{project}}-dotcache: /home/worker/.cache
-      level-{{level}}-{{project}}-tc-vcs: '/home/worker/.tc-vcs'
-    capabilities:
-      devices:
-        loopbackVideo: true
-        loopbackAudio: true
     env:
-      GECKO_HEAD_REPOSITORY: '{{{head_repository}}}'
-      GECKO_HEAD_REV: '{{{head_rev}}}'
       NEED_XVFB: true
       NEED_PULSEAUDIO: true
       MOZHARNESS_SCRIPT: 'mozharness/scripts/desktop_unittest.py'
       MOZHARNESS_CONFIG: >
         mozharness/configs/unittests/linux_unittest.py
         mozharness/configs/remove_executables.py
     command:
       - bash
--- a/testing/taskcluster/tasks/tests/mulet_reftests.yml
+++ b/testing/taskcluster/tasks/tests/mulet_reftests.yml
@@ -1,33 +1,32 @@
 ---
 $inherits:
   from: 'tasks/tests/b2g_unittest_base.yml'
 task:
   metadata:
-    name: '[TC] Reftest'
-    description: Reftest test run {{chunk}}
+    name: '[TC] Mulet Reftest ( {{chunk}} )'
+    description: Mulet Reftest run {{chunk}}
 
   payload:
     env:
       MOZ_DISABLE_NONLOCAL_CONNECTIONS: 0
+      NEED_XVFB: true
+      NEED_PULL_GAIA: true
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/mulet_unittest.py'
+      MOZHARNESS_CONFIG: 'mozharness/configs/b2g/taskcluster_mulet_automation.py'
     command:
-      - entrypoint
-      - ./bin/pull_gaia.sh &&
-      - >
-        python ./mozharness/scripts/mulet_unittest.py
-        --config-file ./mozharness/configs/b2g/taskcluster_mulet_automation.py
-        --installer-url {{build_url}}
-        --test-packages-url {{test_packages_url}}
-        --test-suite reftest
-        --test-manifest tests/layout/reftests/reftest.list
-        --this-chunk {{chunk}}
-        --total-chunk {{total_chunks}}
-        --gaia-repo https://hg.mozilla.org/integration/gaia-central
-        --gaia-dir /home/worker/gaia
+      - bash
+      - /home/worker/bin/test.sh
+      - --installer-url={{build_url}}
+      - --test-packages-url={{test_packages_url}}
+      - --test-suite=reftest
+      - --test-manifest=tests/layout/reftests/reftest.list
+      - --this-chunk={{chunk}}
+      - --total-chunk={{total_chunks}}
     artifacts:
       'public/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
 
   extra:
     treeherderEnv:
@@ -35,8 +34,9 @@ task:
       - staging
     chunks:
       total: 6
     treeherder:
       groupSymbol: R
       groupName: Mulet Reftest
       symbol: 'R{{chunk}}'
       productName: b2g
+      tier: 3