diff --git a/b2g/config/emulator-x86-kk/config.json b/b2g/config/emulator-x86-kk/config.json new file mode 100644 index 000000000000..e23d3e36a604 --- /dev/null +++ b/b2g/config/emulator-x86-kk/config.json @@ -0,0 +1,32 @@ +{ + "config_version": 2, + "tooltool_manifest": "releng-emulator-kk.tt", + "mock_target": "mozilla-centos6-x86_64", + "mock_packages": ["ccache", "make", "bison", "flex", "gcc", "g++", "mpfr", "zlib-devel", "ncurses-devel", "zip", "autoconf213", "glibc-static", "perl-Digest-SHA", "wget", "alsa-lib", "atk", "cairo", "dbus-glib", "fontconfig", "freetype", "glib2", "gtk2", "libXRender", "libXt", "pango", "mozilla-python27-mercurial", "openssh-clients", "nss-devel", "glibc-devel.i686", "libstdc++.i686", "zlib-devel.i686", "ncurses-devel.i686", "libX11-devel.i686", "mesa-libGL-devel.i686", "mesa-libGL-devel", "libX11-devel", "git", "libxml2"], + "mock_files": [["/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"]], + "build_targets": ["droid", "package-emulator", "package-tests"], + "upload_files": [ + "{workdir}/out/target/product/generic/*.tar.bz2", + "{workdir}/out/target/product/generic/tests/*.zip", + "{workdir}/out/emulator.tar.gz", + "{objdir}/dist/b2g-*.crashreporter-symbols.zip", + "{workdir}/sources.xml" + ], + "public_upload_files": [ + "{workdir}/out/target/product/generic/*.tar.bz2", + "{workdir}/out/target/product/generic/tests/*.zip", + "{objdir}/dist/b2g-*.crashreporter-symbols.zip", + "{objdir}/dist/b2g-*.tar.gz", + "{workdir}/sources.xml" + ], + "upload_platform": "emulator-kk", + "gecko_l10n_root": "https://hg.mozilla.org/l10n-central", + "gaia": { + "l10n": { + "vcs": "hgtool", + "root": "https://hg.mozilla.org/gaia-l10n" + } + }, + "b2g_manifest": "emulator-kk.xml", + "b2g_manifest_intree": true +} diff --git a/b2g/config/emulator-x86-kk/releng-emulator-kk.tt b/b2g/config/emulator-x86-kk/releng-emulator-kk.tt new file mode 100644 index 000000000000..1af12208b9da --- /dev/null +++ b/b2g/config/emulator-x86-kk/releng-emulator-kk.tt @@ -0,0 +1,9 @@ +[ +{ +"size": 80458572, +"digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad", +"algorithm": "sha512", +"filename": "gcc.tar.xz", +"unpack": "True" +} +] diff --git a/b2g/config/emulator-x86-kk/sources.xml b/b2g/config/emulator-x86-kk/sources.xml new file mode 120000 index 000000000000..18e0e35ca393 --- /dev/null +++ b/b2g/config/emulator-x86-kk/sources.xml @@ -0,0 +1 @@ +../emulator-kk/sources.xml \ No newline at end of file diff --git a/b2g/config/emulator-x86-l/config.json b/b2g/config/emulator-x86-l/config.json new file mode 100644 index 000000000000..3141c796cbb8 --- /dev/null +++ b/b2g/config/emulator-x86-l/config.json @@ -0,0 +1,32 @@ +{ + "config_version": 2, + "tooltool_manifest": "releng-emulator-l.tt", + "mock_target": "mozilla-centos6-x86_64", + "mock_packages": ["ccache", "make", "bison", "flex", "gcc", "g++", "mpfr", "zlib-devel", "ncurses-devel", "zip", "autoconf213", "glibc-static", "perl-Digest-SHA", "wget", "alsa-lib", "atk", "cairo", "dbus-glib", "fontconfig", "freetype", "glib2", "gtk2", "libXRender", "libXt", "pango", "mozilla-python27-mercurial", "openssh-clients", "nss-devel", "glibc-devel.i686", "libstdc++.i686", "zlib-devel.i686", "ncurses-devel.i686", "libX11-devel.i686", "mesa-libGL-devel.i686", "mesa-libGL-devel", "libX11-devel", "git", "libxml2"], + "mock_files": [["/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"]], + "build_targets": ["droid", "package-emulator", "package-tests"], + "upload_files": [ + "{workdir}/out/target/product/generic/*.tar.bz2", + "{workdir}/out/target/product/generic/tests/*.zip", + "{workdir}/out/emulator.tar.gz", + "{objdir}/dist/b2g-*.crashreporter-symbols.zip", + "{workdir}/sources.xml" + ], + "public_upload_files": [ + "{workdir}/out/target/product/generic/*.tar.bz2", + "{workdir}/out/target/product/generic/tests/*.zip", + "{objdir}/dist/b2g-*.crashreporter-symbols.zip", + "{objdir}/dist/b2g-*.tar.gz", + "{workdir}/sources.xml" + ], + "upload_platform": "emulator-l", + "gecko_l10n_root": "https://hg.mozilla.org/l10n-central", + "gaia": { + "l10n": { + "vcs": "hgtool", + "root": "https://hg.mozilla.org/gaia-l10n" + } + }, + "b2g_manifest": "emulator-l.xml", + "b2g_manifest_intree": true +} diff --git a/b2g/config/emulator-x86-l/releng-emulator-l.tt b/b2g/config/emulator-x86-l/releng-emulator-l.tt new file mode 100644 index 000000000000..1af12208b9da --- /dev/null +++ b/b2g/config/emulator-x86-l/releng-emulator-l.tt @@ -0,0 +1,9 @@ +[ +{ +"size": 80458572, +"digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad", +"algorithm": "sha512", +"filename": "gcc.tar.xz", +"unpack": "True" +} +] diff --git a/b2g/config/emulator-x86-l/sources.xml b/b2g/config/emulator-x86-l/sources.xml new file mode 120000 index 000000000000..54d5a68eeda6 --- /dev/null +++ b/b2g/config/emulator-x86-l/sources.xml @@ -0,0 +1 @@ +../emulator-l/sources.xml \ No newline at end of file diff --git a/testing/taskcluster/scripts/builder/build-emulator-x86.sh b/testing/taskcluster/scripts/builder/build-emulator-x86.sh new file mode 100755 index 000000000000..adf7918a926f --- /dev/null +++ b/testing/taskcluster/scripts/builder/build-emulator-x86.sh @@ -0,0 +1,71 @@ +#! /bin/bash -vex + +# Ensure all the scripts in this dir are on the path.... +DIRNAME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +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 + +# 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 ... +# +if [ ! -d mozharness ]; then + tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV +fi + +# 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 + +# 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 + +./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 \ + --base-repo=$GECKO_BASE_REPOSITORY \ + --repo=$GECKO_HEAD_REPOSITORY + +# Move files into artifact locations! +mkdir -p $HOME/artifacts + +ls -lah $WORKSPACE/B2G/out +ls -lah $WORKSPACE/B2G/objdir-gecko/dist/ + +mv $WORKSPACE/B2G/sources.xml $HOME/artifacts/sources.xml +mv $WORKSPACE/B2G/out/target/product/generic_x86/tests/gaia-tests.zip $HOME/artifacts/gaia-tests.zip +mv $WORKSPACE/B2G/out/target/product/generic_x86/tests/b2g-*.zip $HOME/artifacts/b2g-tests.zip +mv $WORKSPACE/B2G/out/emulator.tar.gz $HOME/artifacts/emulator.tar.gz +mv $WORKSPACE/B2G/objdir-gecko/dist/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip + +ccache -s + diff --git a/testing/taskcluster/scripts/builder/build-emulator.sh b/testing/taskcluster/scripts/builder/build-emulator.sh index 34a6f569f80b..9e56f0c2251a 100755 --- a/testing/taskcluster/scripts/builder/build-emulator.sh +++ b/testing/taskcluster/scripts/builder/build-emulator.sh @@ -28,7 +28,11 @@ if [ ! -d mozharness ]; then fi # 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) + +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 # Ensure symlink has been created to gecko... diff --git a/testing/taskcluster/tasks/branches/base_job_flags.yml b/testing/taskcluster/tasks/branches/base_job_flags.yml index a225964d25b8..7ef2e4609f5e 100644 --- a/testing/taskcluster/tasks/branches/base_job_flags.yml +++ b/testing/taskcluster/tasks/branches/base_job_flags.yml @@ -9,6 +9,7 @@ flags: - emulator - emulator-jb - emulator-kk + - emulator-x86-kk - emulator-l - linux32_gecko # b2g desktop linux 32 bit - linux64_gecko # b2g desktop linux 64 bit diff --git a/testing/taskcluster/tasks/branches/try/job_flags.yml b/testing/taskcluster/tasks/branches/try/job_flags.yml index ce6922a4131b..f8ccb75e8366 100644 --- a/testing/taskcluster/tasks/branches/try/job_flags.yml +++ b/testing/taskcluster/tasks/branches/try/job_flags.yml @@ -36,6 +36,18 @@ builds: task: tasks/builds/b2g_emulator_kk_opt.yml debug: task: tasks/builds/b2g_emulator_kk_debug.yml + emulator-x86-l: + platfoms: + - b2g + types: + opt: + task: tasks/builds/b2g_emulator_x86_l_opt.yml + emulator-x86-kk: + platfoms: + - b2g + types: + opt: + task: tasks/builds/b2g_emulator_x86_kk_opt.yml emulator-jb: platfoms: - b2g @@ -134,6 +146,10 @@ tests: task: tasks/tests/b2g_emulator_mochitest.yml tasks/builds/b2g_emulator_kk_opt.yml: task: tasks/tests/b2g_emulator_mochitest.yml + tasks/builds/b2g_emulator_x86_l_opt.yml: + task: tasks/tests/b2g_emulator_mochitest.yml + tasks/builds/b2g_emulator_x86_kk_opt.yml: + task: tasks/tests/b2g_emulator_mochitest.yml tasks/builds/b2g_emulator_ics_opt.yml: task: tasks/tests/b2g_emulator_mochitest.yml tasks/builds/b2g_emulator_ics_debug.yml: @@ -150,6 +166,10 @@ tests: task: tasks/tests/mulet_reftests.yml tasks/builds/b2g_emulator_kk_opt.yml: task: tasks/tests/b2g_emulator_reftest.yml + tasks/builds/b2g_emulator_x86_l_opt.yml: + task: tasks/tests/b2g_emulator_reftest.yml + tasks/builds/b2g_emulator_x86_kk_opt.yml: + task: tasks/tests/b2g_emulator_reftest.yml tasks/builds/b2g_emulator_ics_opt.yml: task: tasks/tests/b2g_emulator_reftest.yml reftest-sanity-oop: @@ -158,6 +178,8 @@ tests: task: tasks/tests/b2g_reftests_sanity_oop.yml xpcshell: allowed_build_tasks: + tasks/builds/b2g_emulator_x86_kk_opt.yml: + task: tasks/tests/b2g_emulator_xpcshell_chunked.yml tasks/builds/b2g_emulator_kk_opt.yml: task: tasks/tests/b2g_emulator_xpcshell_chunked.yml tasks/builds/b2g_emulator_ics_opt.yml: diff --git a/testing/taskcluster/tasks/builds/b2g_emulator_x86_base.yml b/testing/taskcluster/tasks/builds/b2g_emulator_x86_base.yml new file mode 100644 index 000000000000..a02597a1c871 --- /dev/null +++ b/testing/taskcluster/tasks/builds/b2g_emulator_x86_base.yml @@ -0,0 +1,34 @@ +$inherits: + from: 'tasks/build.yml' +task: + metadata: + description: | + Android emulators + b2g environment used in full stack testing. + payload: + env: + TARGET: 'emulator' + B2G_DEBUG: 0 + + # Emulators can take a very long time to build! + maxRunTime: 14400 + + command: + - /bin/bash + - -c + - > + checkout-gecko workspace && + cd ./workspace/gecko/testing/taskcluster/scripts/builder && + buildbot_step 'Build' ./build-emulator-x86.sh $HOME/workspace + + extra: + treeherder: + groupSymbol: x86 + # Rather then enforcing particular conventions we require that all build + # tasks provide the "build" extra field to specify where the build and tests + # files are located. + locations: + build: 'public/build/emulator.tar.gz' + tests: 'public/build/b2g-tests.zip' + symbols: 'public/build/b2g-crashreporter-symbols.zip' + sources: 'public/build/sources.xml' + diff --git a/testing/taskcluster/tasks/builds/b2g_emulator_x86_kk_opt.yml b/testing/taskcluster/tasks/builds/b2g_emulator_x86_kk_opt.yml new file mode 100644 index 000000000000..77a5ddc11439 --- /dev/null +++ b/testing/taskcluster/tasks/builds/b2g_emulator_x86_kk_opt.yml @@ -0,0 +1,22 @@ +$inherits: + from: 'tasks/builds/b2g_emulator_x86_base.yml' +task: + workerType: emualtor-x86-kk + scopes: + - 'docker-worker:cache:workspace-emulator-kk-x86-opt' + metadata: + name: '[TC] B2G KK X86 Emulator (Opt)' + + extra: + treeherderEnv: + - staging + treeherder: + # Disable "TC" prefix... + machine: + platform: b2g-emu-kk + + payload: + cache: + workspace-emulator-kk-x86-opt: /home/worker/workspace + env: + TARGET: 'emulator-x86-kk' diff --git a/testing/taskcluster/tasks/builds/b2g_emulator_x86_l_opt.yml b/testing/taskcluster/tasks/builds/b2g_emulator_x86_l_opt.yml new file mode 100644 index 000000000000..01efe5c6b4f0 --- /dev/null +++ b/testing/taskcluster/tasks/builds/b2g_emulator_x86_l_opt.yml @@ -0,0 +1,34 @@ +$inherits: + from: 'tasks/builds/b2g_emulator_base.yml' +task: + workerType: emulator-l + scopes: + - 'docker-worker:cache:workspace-emulator-l-x86-opt' + metadata: + name: '[TC] B2G X86 L Emulator (Opt)' + + extra: + treeherderEnv: + - staging + treeherder: + # Disable "TC" prefix... + groupSymbol: "X86" + machine: + platform: b2g-emu-l + + payload: + command: + - /bin/bash + - -c + - > + checkout-gecko workspace && + cd ./workspace/gecko/testing/taskcluster/scripts/builder && + buildbot_step 'Build' ./build-emulator-x86.sh $HOME/workspace + + cache: + workspace-emulator-l-x86-opt: /home/worker/workspace + env: + TARGET: 'emulator-x86-l' + + + diff --git a/testing/taskcluster/tasks/job_flags.yml b/testing/taskcluster/tasks/job_flags.yml index 3be915c06e36..d67383326f4e 100644 --- a/testing/taskcluster/tasks/job_flags.yml +++ b/testing/taskcluster/tasks/job_flags.yml @@ -8,6 +8,7 @@ flags: - emulator - emulator-jb - emulator-kk + - emulator-x86-kk - linux32_gecko # b2g desktop linux 32 bit - linux64_gecko # b2g desktop linux 64 bit - linux64-mulet # Firefox desktop - b2g gecko linux 64 bit