From bf294fee3803dec5c3fbe23f002a8e728ea7711b Mon Sep 17 00:00:00 2001 From: Gregory Arndt Date: Mon, 11 May 2015 08:15:50 -0500 Subject: [PATCH] Bug 1163057 - Allow loopback devices to be used within tasks. r=lightsofapollo --- testing/docker/tester/Dockerfile | 7 +++++-- testing/docker/tester/VERSION | 2 +- testing/docker/tester/bin/entrypoint | 3 ++- .../docker/tester/mozharness_configs/linux_mulet_config.py | 6 ------ testing/taskcluster/tasks/test.yml | 6 ++++++ testing/taskcluster/tasks/tests/mulet_mochitests.yml | 2 -- 6 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 testing/docker/tester/mozharness_configs/linux_mulet_config.py diff --git a/testing/docker/tester/Dockerfile b/testing/docker/tester/Dockerfile index 96f1640447f..427a329dc29 100644 --- a/testing/docker/tester/Dockerfile +++ b/testing/docker/tester/Dockerfile @@ -12,17 +12,20 @@ ADD https://s3-us-west-2.amazonaws.com/test-caching/packages/linux64- ADD https://raw.githubusercontent.com/taskcluster/buildbot-step/master/buildbot_step /home/worker/bin/buildbot_step COPY tc-vcs-config.yml /etc/taskcluster-vcs.yml - # Run test setup script RUN chmod u+x /home/worker/bin/buildbot_step RUN chmod u+x /usr/local/bin/linux64-minidump_stackwalk RUN apt-get install -y python-pip && pip install virtualenv; RUN mkdir Documents; mkdir Pictures; mkdir Music; mkdir Videos; mkdir artifacts -RUN chown -R worker:worker /home/worker/* /home/worker/.* RUN npm install -g taskcluster-vcs@2.3.4 RUN rm -Rf .cache && mkdir -p .cache ENV PATH $PATH:/home/worker/bin +# Remove once running under 'worker' user. This is necessary for pulseaudio to start +# XXX: change this back to worker:worker once permissions issues are resolved +RUN chown -R root:root /home/worker + + # TODO Re-enable worker when bug 1093833 lands #USER worker diff --git a/testing/docker/tester/VERSION b/testing/docker/tester/VERSION index 769ed6ae790..b005e307c51 100644 --- a/testing/docker/tester/VERSION +++ b/testing/docker/tester/VERSION @@ -1 +1 @@ -0.2.14 +0.2.15 diff --git a/testing/docker/tester/bin/entrypoint b/testing/docker/tester/bin/entrypoint index 6f8417602ac..149f33d0c36 100755 --- a/testing/docker/tester/bin/entrypoint +++ b/testing/docker/tester/bin/entrypoint @@ -10,9 +10,10 @@ test $MOZHARNESS_REV # mozharness revision # XXX: Note that all tests could be faster at smaller bit depth Xvfb :0 -nolisten tcp -screen 0 1600x1200x24 2>/dev/null & - export DISPLAY=:0 +pulseaudio --start + # First check if the mozharness directory is available. This is intended to be # used locally in development to test mozharness changes: # diff --git a/testing/docker/tester/mozharness_configs/linux_mulet_config.py b/testing/docker/tester/mozharness_configs/linux_mulet_config.py deleted file mode 100644 index 78bdec47086..00000000000 --- a/testing/docker/tester/mozharness_configs/linux_mulet_config.py +++ /dev/null @@ -1,6 +0,0 @@ -config = { - # Override buildbot specific exes for python and virtualenv - "exes": {}, - # Use taskcluster specified config until Bug 1099057 lands - "in_tree_config": "config/mozharness/taskcluster_linux_config.py" -} diff --git a/testing/taskcluster/tasks/test.yml b/testing/taskcluster/tasks/test.yml index dbbaca7c5d1..a95cf4abdb6 100644 --- a/testing/taskcluster/tasks/test.yml +++ b/testing/taskcluster/tasks/test.yml @@ -17,8 +17,14 @@ task: - 'queue:create-task:aws-provisioner/test-c4-2xlarge' - 'docker-worker:cache:tc-vcs' - 'docker-worker:cache:linux-cache' + - 'docker-worker:capability:device:loopbackVideo' + - 'docker-worker:capability:device:loopbackAudio' payload: + capabilities: + devices: + loopbackVideo: true + loopbackAudio: true image: '{{#docker_image}}tester{{/docker_image}}' maxRunTime: 3600 cache: diff --git a/testing/taskcluster/tasks/tests/mulet_mochitests.yml b/testing/taskcluster/tasks/tests/mulet_mochitests.yml index b588a70586b..1b7b63b90d5 100644 --- a/testing/taskcluster/tasks/tests/mulet_mochitests.yml +++ b/testing/taskcluster/tasks/tests/mulet_mochitests.yml @@ -5,7 +5,6 @@ task: metadata: name: '[TC] Mulet Mochitests ( {{chunk}} )' description: Mulet Mochitest run {{chunk}} - payload: command: - entrypoint # entrypoint ensures we are running in xvfb @@ -13,7 +12,6 @@ task: python ./mozharness/scripts/desktop_unittest.py --no-read-buildbot-config --config-file ./mozharness/configs/unittests/linux_unittest.py - --config-file ./mozharness_configs/linux_mulet_config.py --config-file ./mozharness_configs/remove_executables.py --installer-url {{build_url}} --test-url {{tests_url}}