Bug 1606922 - Move MOZ_AUTOMATION_PACKAGE_TESTS from mozconfigs to taskcluster; r=tomprince,chmanchester

We don't need to package tests for builds that we don't actually run
tests from, but it is tricky to align this correctly by setting
MOZ_AUTOMATION_PACKAGE_TESTS=0 in relevant mozconfigs. Instead we can
set the environment variable in the task definition, and use a full
taskgraph verification check to ensure that the flag is only set on
builds that have tests.

The one tricky area is the win64-aarch64 builds, which have a workaround
by specifying the new skip-verify-test-packaging attribute.

In one case, win64-aarch64-shippable has tests that run against it, but
it copies those tests from a win64-aarch64-shippable-no-eme task, which
itself has no tests. Both of those tasks need to skip the verify check
as a result.

In another case, the win64-aarch64-eme task is an artifact build that
grabs test packages from the win64-aarch64 build. Since the win64-aarch64
build doesn't have tests, it needs to skip the verify check.

Differential Revision: https://phabricator.services.mozilla.com/D59426

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Shal 2020-02-24 19:08:23 +00:00
Родитель 782454dd06
Коммит 0bff663e83
33 изменённых файлов: 99 добавлений и 27 удалений

Просмотреть файл

@ -1,6 +1,5 @@
. $topsrcdir/browser/config/mozconfigs/linux32/nightly
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=0"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=0"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
mk_add_options MOZ_MAKE_FLAGS=--output-sync=line

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
mk_add_options MOZ_MAKE_FLAGS=--output-sync=line

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_CHECK=0

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/build/mozconfig.common"

Просмотреть файл

@ -1,6 +1,5 @@
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=0"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=0"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
mk_add_options MOZ_MAKE_FLAGS=--output-sync=line

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
mk_add_options MOZ_MAKE_FLAGS=--output-sync=line

Просмотреть файл

@ -1,7 +1,6 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_UPLOAD=0
MOZ_AUTOMATION_UPLOAD_SYMBOLS=0

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_CHECK=0

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. $topsrcdir/build/macosx/mozconfig.common

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. $topsrcdir/build/macosx/mozconfig.common

Просмотреть файл

@ -1,6 +1,5 @@
. $topsrcdir/browser/config/mozconfigs/macosx64/nightly
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=0"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=0"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/build/mozconfig.win-common"

Просмотреть файл

@ -1,6 +1,5 @@
. $topsrcdir/browser/config/mozconfigs/win32/nightly
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=0"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=0"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/browser/config/mozconfigs/win32/nightly"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/browser/config/mozconfigs/win32/debug"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_CHECK=0

Просмотреть файл

@ -1,6 +1,5 @@
. $topsrcdir/browser/config/mozconfigs/win64/nightly
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=0"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=0"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/browser/config/mozconfigs/win64/nightly"

Просмотреть файл

@ -1,5 +1,4 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/browser/config/mozconfigs/win64/debug"

Просмотреть файл

@ -12,9 +12,12 @@
mk_add_options "export MOZ_AUTOMATION_BUILD_SYMBOLS=${MOZ_AUTOMATION_BUILD_SYMBOLS-1}"
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=${MOZ_AUTOMATION_L10N_CHECK-0}"
mk_add_options "export MOZ_AUTOMATION_PACKAGE=${MOZ_AUTOMATION_PACKAGE-1}"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=${MOZ_AUTOMATION_PACKAGE_TESTS-1}"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=${MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES-1}"
mk_add_options "export MOZ_AUTOMATION_UPLOAD=${MOZ_AUTOMATION_UPLOAD-1}"
mk_add_options "export MOZ_AUTOMATION_CHECK=${MOZ_AUTOMATION_CHECK-1}"
# The following variables are expected to be exported by Taskcluster
# configuration files rather than mozconfig files
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=${MOZ_AUTOMATION_PACKAGE_TESTS-0}"
export MOZ_AUTOMATION_MOZCONFIG=1

Просмотреть файл

@ -13,7 +13,6 @@ MOZ_HAZARD=1
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_UPLOAD=0
ac_add_options --enable-js-shell

Просмотреть файл

@ -2,7 +2,6 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_UPLOAD=0
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0

Просмотреть файл

@ -2,7 +2,6 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_UPLOAD=0
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0

Просмотреть файл

@ -1,6 +1,5 @@
. "$topsrcdir/mobile/android/config/mozconfigs/android-api-16/nightly"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=0"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
ac_add_options --enable-profile-generate

Просмотреть файл

@ -55,6 +55,7 @@ android-api-16/debug:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]
@ -146,6 +147,7 @@ android-api-16/opt:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]
@ -169,6 +171,7 @@ android-api-16/pgo:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]
@ -218,6 +221,7 @@ android-aarch64/opt:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]
@ -241,6 +245,7 @@ android-aarch64/pgo:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]
@ -262,6 +267,7 @@ android-aarch64/debug:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]
@ -312,6 +318,7 @@ android-x86_64/opt:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]
@ -361,6 +368,7 @@ android-x86_64/debug:
worker:
env:
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]

Просмотреть файл

@ -16,6 +16,8 @@ linux64/opt:
worker-type: b-linux
worker:
max-run-time: 7200
env:
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]
@ -133,6 +135,8 @@ linux64/debug:
worker-type: b-linux
worker:
max-run-time: 5400
env:
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]
@ -214,6 +218,8 @@ linux64-devedition/opt:
worker-type: b-linux
worker:
max-run-time: 7200
env:
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]
@ -617,6 +623,8 @@ linux-shippable/opt:
worker:
docker-image: {in-tree: debian7-i386-build}
max-run-time: 9000
env:
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]
@ -697,6 +705,7 @@ linux64-asan/opt:
env:
PERFHERDER_EXTRA_OPTIONS: "opt asan"
ASAN_OPTIONS: "detect_leaks=0"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
max-run-time: 5400
run:
using: mozharness
@ -1027,6 +1036,8 @@ linux64-shippable/opt:
worker-type: b-linux
worker:
max-run-time: 9000
env:
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]
@ -1231,6 +1242,7 @@ linux64-ccov/opt:
MOZ_LOW_PARALLELISM_BUILD: '1'
FORCE_GCC: '1'
RUSTC_BOOTSTRAP: '1'
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]

Просмотреть файл

@ -18,6 +18,7 @@ macosx64/debug:
max-run-time: 5400
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]
@ -197,6 +198,7 @@ macosx64-devedition/opt:
max-run-time: 7200
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]
@ -335,6 +337,7 @@ macosx64-shippable/opt:
max-run-time: 7200
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
using: mozharness
actions: [get-secrets, build]

Просмотреть файл

@ -25,6 +25,7 @@ win32-mingwclang/opt:
worker:
env:
PERFHERDER_EXTRA_OPTIONS: "opt 32 clang"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
config:
- builds/releng_base_firefox.py
@ -57,6 +58,7 @@ win32-mingwclang/debug:
worker:
env:
PERFHERDER_EXTRA_OPTIONS: "debug 32 clang"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
config:
- builds/releng_base_firefox.py
@ -88,6 +90,7 @@ win64-mingwclang/opt:
worker:
env:
PERFHERDER_EXTRA_OPTIONS: "opt 64 clang"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
config:
- builds/releng_base_firefox.py
@ -120,6 +123,7 @@ win64-mingwclang/debug:
worker:
env:
PERFHERDER_EXTRA_OPTIONS: "debug 64 clang"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
config:
- builds/releng_base_firefox.py

Просмотреть файл

@ -28,6 +28,7 @@ win32/debug:
max-run-time: 7200
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -65,6 +66,7 @@ win32/opt:
max-run-time: 7200
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -103,6 +105,7 @@ win64/debug:
max-run-time: 7200
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -214,6 +217,7 @@ win64/opt:
max-run-time: 7200
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -303,6 +307,7 @@ win32-shippable/opt:
max-run-time: 10800
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -344,6 +349,7 @@ win64-shippable/opt:
max-run-time: 10800
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -677,6 +683,7 @@ win64-ccov/opt:
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
RUSTC_BOOTSTRAP: '1'
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -749,6 +756,7 @@ win64-asan/opt:
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
PERFHERDER_EXTRA_OPTIONS: "opt asan"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -884,6 +892,7 @@ win32-devedition/opt:
max-run-time: 10800
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
script: mozharness/scripts/fx_desktop_build.py
secrets: true
@ -927,6 +936,7 @@ win64-devedition/opt:
max-run-time: 10800
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
options: [append-env-variables-from-configs]
script: mozharness/scripts/fx_desktop_build.py
@ -996,6 +1006,10 @@ win64-aarch64/opt:
attributes:
enable-build-signing: true
enable-full-crashsymbols: true
# We need to package tests in order for the win64-aarch64-eme artifact
# build to fetch them, even though no tests run against this task
# directly.
skip-verify-test-packaging: true
treeherder:
platform: windows2012-aarch64/opt
symbol: B
@ -1006,6 +1020,7 @@ win64-aarch64/opt:
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/aarch64.manifest"
PERFHERDER_EXTRA_OPTIONS: aarch64
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
options: [append-env-variables-from-configs]
@ -1074,6 +1089,9 @@ win64-aarch64-shippable/opt:
attributes:
shippable: true
enable-full-crashsymbols: true
# Skip the test packaging check because we copy test packages from
# another build task rather than generating them in this task.
skip-verify-test-packaging: true
shipping-phase: build
shipping-product: firefox
treeherder:
@ -1088,7 +1106,6 @@ win64-aarch64-shippable/opt:
PERFHERDER_EXTRA_OPTIONS: aarch64
MOZ_ARTIFACT_TASK: {task-reference: '<win64-aarch64-opt>'}
MOZ_ARTIFACT_TASK_WIN32_OPT: {task-reference: '<win32-opt>'}
MOZ_AUTOMATION_PACKAGE_TESTS: '0'
USE_ARTIFACT: '1'
run:
actions: [get-secrets, build]
@ -1165,6 +1182,10 @@ win64-aarch64-shippable-no-eme/opt:
type: shippable
attributes:
enable-full-crashsymbols: true
# We need to package tests in order for the actual
# win64-aarch64-shippable/opt build to copy them from this task, even
# though no tests run against this task directly.
skip-verify-test-packaging: true
shipping-phase: build
shipping-product: firefox
treeherder:
@ -1177,6 +1198,7 @@ win64-aarch64-shippable-no-eme/opt:
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/aarch64.manifest"
PERFHERDER_EXTRA_OPTIONS: aarch64-no-eme
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
run:
actions: [get-secrets, build]
options: [append-env-variables-from-configs]

Просмотреть файл

@ -340,3 +340,10 @@ run-visual-metrics
==================
If set to true, will run the visual metrics task on the provided
video files.
skip-verify-test-packaging
==================
If set to true, this task will not be checked to see that
MOZ_AUTOMATION_PACKAGE_TESTS is set correctly based on whether or not the task
has dependent tests. This should only be used in very unique situations, such
as Windows AArch64 builds that copy test packages between build tasks.

Просмотреть файл

@ -261,3 +261,41 @@ def verify_nightly_no_sccache(task, taskgraph, scratch_pad, graph_config):
if task.task.get('payload', {}).get('env', {}).get('USE_SCCACHE'):
raise Exception(
'Nightly job {} cannot use sccache'.format(task.label))
@verifications.add('full_task_graph')
def verify_test_packaging(task, taskgraph, scratch_pad, graph_config):
if task is None:
for task in taskgraph.tasks.itervalues():
if task.kind == 'build' and not task.attributes.get('skip-verify-test-packaging'):
build_env = task.task.get('payload', {}).get('env', {})
package_tests = build_env.get('MOZ_AUTOMATION_PACKAGE_TESTS')
shippable = task.attributes.get('shippable', False)
build_has_tests = scratch_pad.get(task.label)
if package_tests != '1':
# Shippable builds should always package tests.
if shippable:
raise Exception('Build job {} is shippable and does not specify '
'MOZ_AUTOMATION_PACKAGE_TESTS=1 in the '
'environment.'.format(task.label))
# Build tasks in the scratch pad have tests dependent on
# them, so we need to package tests during build.
if build_has_tests:
raise Exception(
'Build job {} has tests dependent on it and does not specify '
'MOZ_AUTOMATION_PACKAGE_TESTS=1 in the environment'.format(task.label))
else:
# Build tasks that aren't in the scratch pad have no
# dependent tests, so we shouldn't package tests.
if not build_has_tests:
raise Exception(
'Build job {} has no tests, but specifies '
'MOZ_AUTOMATION_PACKAGE_TESTS={} in the environment. '
'Unset MOZ_AUTOMATION_PACKAGE_TESTS in the task definition '
'to fix.'.format(task.label, package_tests))
return
if task.kind == 'test':
build_task = taskgraph[task.dependencies['build']]
scratch_pad[build_task.label] = 1