Bug 1223123 - Enable pulse_audio for Linux64 TC desktop jobs + proper window manager. r=dustin
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Wed, 25 Nov 2015 14:56:02 -0500
changeset 274535 6eeb5d9cc0d8a34303fa6871a58e0b130ec55131
parent 274534 4f04c4b2cf602d383d5125ca7d8080ec2ad652b9
child 274536 451be287fbc941247b6219d278904fba8c191d54
push id29734
push usercbook@mozilla.com
push dateMon, 30 Nov 2015 12:19:25 +0000
treeherdermozilla-central@a18630f9ab42 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1223123
milestone45.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 1223123 - Enable pulse_audio for Linux64 TC desktop jobs + proper window manager. r=dustin
.hgignore
testing/docker/README.md
testing/docker/desktop-test/Dockerfile
testing/docker/desktop-test/VERSION
testing/docker/ubuntu1204-test-upd/Dockerfile
testing/docker/ubuntu1204-test-upd/VERSION
testing/docker/ubuntu1204-test/VERSION
testing/docker/ubuntu1204-test/system-setup.sh
testing/taskcluster/scripts/tester/test-linux.sh
testing/taskcluster/tasks/tests/fx_unittest_base.yml
--- a/.hgignore
+++ b/.hgignore
@@ -93,16 +93,19 @@ GPATH
 # XCode project cruft
 ^embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/project.xcworkspace/xcuserdata
 ^embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/xcuserdata
 
 # Ignore mozharness execution files
 ^testing/mozharness/logs/
 ^testing/mozharness/build/
 
+# Ignore tox generated dir
+.tox/
+
 # Ignore node_modules from eslint-plugin-mozilla
 ^testing/eslint-plugin-mozilla/node_modules/
 
 # Ignore talos virtualenv and tp5n files.
 # The tp5n set is supposed to be decompressed at
 # testing/talos/talos/page_load_test/tp5n in order to run tests like tps
 # locally. Similarly, running talos requires a Python package virtual
 # environment. Both the virtual environment and tp5n files end up littering
--- a/testing/docker/README.md
+++ b/testing/docker/README.md
@@ -91,18 +91,18 @@ Example:
 
 Each image has a version, given by its `VERSION` file.  This should be bumped when any changes are made that will be deployed into taskcluster.
 Then, older tasks which were designed to run on an older version of the image can still be executed in taskcluster, while new tasks can use the new version.
 
 Each image also has a `REGISTRY`, defaulting to the `REGISTRY` in this directory, and specifying the image registry to which the completed image should be uploaded.
 
 ## Building images
 
-Generally images can be pulled from the [registry](./REGISTRY) rather then
-build locally, but for developing new images its often helpful to hack on
+Generally, images can be pulled from the [registry](./REGISTRY) rather than
+built locally, however, for developing new images it's often helpful to hack on
 them locally.
 
 To build an image, invoke `build.sh` with the name of the folder (without a trailing slash):
 ```sh
 ./build.sh base
 ```
 
 This is a tiny wrapper around building the docker images via `docker
--- a/testing/docker/desktop-test/Dockerfile
+++ b/testing/docker/desktop-test/Dockerfile
@@ -1,9 +1,9 @@
-FROM          taskcluster/ubuntu1204-test-upd:0.1.2.20151102105912
+FROM          taskcluster/ubuntu1204-test-upd:0.1.3.20151125000000
 MAINTAINER    Jonas Finnemann Jensen <jopsen@gmail.com>
 
 # Add utilities and configuration
 COPY           dot-config                    /home/worker/.config
 COPY           dot-pulse                     /home/worker/.pulse
 COPY           bin                           /home/worker/bin
 # TODO: remove this when buildbot is gone
 COPY           buildprops.json               /home/worker/buildprops.json
--- a/testing/docker/desktop-test/VERSION
+++ b/testing/docker/desktop-test/VERSION
@@ -1,1 +1,1 @@
-0.4.4
+0.4.5
--- a/testing/docker/ubuntu1204-test-upd/Dockerfile
+++ b/testing/docker/ubuntu1204-test-upd/Dockerfile
@@ -1,9 +1,9 @@
-FROM          taskcluster/ubuntu1204-test:0.1.2
+FROM          taskcluster/ubuntu1204-test:0.1.3
 MAINTAINER    Dustin J. Mitchell <dustin@mozilla.com>
 
 ### update to latest from upstream repositories
 # if this becomes a long list of packages, consider bumping the
 # ubunt1204-test version
 RUN apt-get update && apt-get upgrade -y --force-yes
 
 # Set a default command useful for debugging
--- a/testing/docker/ubuntu1204-test-upd/VERSION
+++ b/testing/docker/ubuntu1204-test-upd/VERSION
@@ -1,1 +1,1 @@
-0.1.2.20151102105912
+0.1.3.20151125000000
--- a/testing/docker/ubuntu1204-test/VERSION
+++ b/testing/docker/ubuntu1204-test/VERSION
@@ -1,1 +1,1 @@
-0.1.2
+0.1.3
--- a/testing/docker/ubuntu1204-test/system-setup.sh
+++ b/testing/docker/ubuntu1204-test/system-setup.sh
@@ -99,16 +99,17 @@ apt_packages+=('tar')
 apt_packages+=('ttf-arphic-uming')
 apt_packages+=('ttf-dejavu')
 apt_packages+=('ttf-indic-fonts-core')
 apt_packages+=('ttf-kannada-fonts')
 apt_packages+=('ttf-oriya-fonts')
 apt_packages+=('ttf-paktype')
 apt_packages+=('ttf-punjabi-fonts')
 apt_packages+=('ttf-sazanami-mincho')
+apt_packages+=('ubuntu-desktop')
 apt_packages+=('unzip')
 apt_packages+=('uuid')
 apt_packages+=('vim')
 apt_packages+=('wget')
 apt_packages+=('xvfb')
 apt_packages+=('yasm')
 apt_packages+=('zip')
 
@@ -118,16 +119,18 @@ apt_packages+=('x11-utils')
 # Bug 1176031: need `xset` to disable screensavers
 apt_packages+=('x11-xserver-utils')
 
 # use Ubuntu's Python-2.7 (2.7.3 on Precise)
 apt_packages+=('python-dev')
 apt_packages+=('python-pip')
 
 apt-get update
+# This allows ubuntu-desktop to be installed without human interaction
+export DEBIAN_FRONTEND=noninteractive
 apt-get install -y --force-yes ${apt_packages[@]}
 
 dpkg-reconfigure locales
 
 # set up tooltool (temporarily)
 curl https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py > /setup/tooltool.py
 tooltool_fetch() {
     cat >manifest.tt
--- a/testing/taskcluster/scripts/tester/test-linux.sh
+++ b/testing/taskcluster/scripts/tester/test-linux.sh
@@ -9,16 +9,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_WINDOW_MANAGER           ${NEED_WINDOW_MANAGER:=false}
 : NEED_PULSEAUDIO               ${NEED_PULSEAUDIO:=false}
 : WORKSPACE                     ${WORKSPACE:=/home/worker/workspace}
 : mozharness args               "${@}"
 
 set -v
 cd $WORKSPACE
 
 # test required parameters are supplied
@@ -70,16 +71,40 @@ 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
 
+if $NEED_WINDOW_MANAGER; then
+    # start up the gnome session, using a semaphore file to know when the session has fully started
+    # (at least to the point where apps are automatically started)
+    semaphore=/tmp/gnome-session-started
+    rm -f $semaphore
+    mkdir -p ~/.config/autostart
+    cat <<EOF > ~/.config/autostart/gnome-started.desktop
+[Desktop Entry]
+Type=Application
+Exec=touch $semaphore
+Hidden=false
+X-GNOME-Autostart-enabled=true
+Name=Startup Complete
+Comment=Notify test-linux.sh that GNOME session startup is complete
+StartupNotify=false
+Terminal=false
+Type=Application
+EOF
+    gnome-session &
+    while [ ! -f $semaphore ]; do
+        sleep 1
+    done
+fi
+
 # support multiple, space delimited, config files
 config_cmds=""
 for cfg in $MOZHARNESS_CONFIG; do
   config_cmds="${config_cmds} --config-file ${cfg}"
 done
 
 # run the given mozharness script and configs, but pass the rest of the
 # arguments in from our own invocation
--- a/testing/taskcluster/tasks/tests/fx_unittest_base.yml
+++ b/testing/taskcluster/tasks/tests/fx_unittest_base.yml
@@ -10,16 +10,18 @@ task:
       - --no-read-buildbot-config
       - --installer-url={{build_url}}
       - --test-packages-url={{test_packages_url}}
       - --download-symbols=ondemand
       - --{{suite}}-suite={{flavor}}
       - --total-chunk={{total_chunks}}
       - --this-chunk={{chunk}}
     env:
+        NEED_WINDOW_MANAGER: true
+        NEED_PULSEAUDIO: true
         GECKO_HEAD_REPOSITORY: '{{{head_repository}}}'
         GECKO_HEAD_REV: '{{{head_rev}}}'
         MOZHARNESS_SCRIPT: 'mozharness/scripts/desktop_unittest.py'
         # TODO move linux_unittest.py to a platform specific config
         MOZHARNESS_CONFIG: >
           mozharness/configs/unittests/linux_unittest.py
           mozharness/configs/remove_executables.py
     artifacts: