зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1534500 - Allow diffoscope tasks to work on unpacked builds. r=dustin
Depends on D23073 Differential Revision: https://phabricator.services.mozilla.com/D23074 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
98c58acec2
Коммит
a6b20da860
|
@ -48,6 +48,15 @@ case "$ORIG_URL" in
|
|||
;;
|
||||
esac
|
||||
|
||||
case "$ORIG_URL" in
|
||||
*/target.apk)
|
||||
OMNIJAR=assets/omni.ja
|
||||
;;
|
||||
*)
|
||||
OMNIJAR=omni.ja
|
||||
;;
|
||||
esac
|
||||
|
||||
# Builds are 99% of the time differing in some small ways, so it's not
|
||||
# really useful to report a failure (at least not until we actually
|
||||
# care about the builds being 100% identical).
|
||||
|
@ -55,6 +64,14 @@ POST=true
|
|||
|
||||
for option; do
|
||||
case "$option" in
|
||||
--unpack)
|
||||
CURDIR=$PWD
|
||||
for dir in a b; do
|
||||
# Need to run mach python from inside the gecko source.
|
||||
# See bug #1533642.
|
||||
(cd $GECKO_PATH && ./mach python toolkit/mozapps/installer/unpack.py --omnijar $OMNIJAR $CURDIR/$dir)
|
||||
done
|
||||
;;
|
||||
--fail)
|
||||
POST="exit 1"
|
||||
;;
|
||||
|
|
|
@ -47,6 +47,11 @@ diff_description_schema = Schema({
|
|||
|
||||
# Fail the task when differences are detected.
|
||||
Optional('fail-on-diff'): bool,
|
||||
|
||||
# Whether to unpack first. Diffoscope can normally work without unpacking,
|
||||
# but when one needs to --exclude some contents, that doesn't work out well
|
||||
# if said content is packed (e.g. in omni.ja).
|
||||
Optional('unpack'): bool,
|
||||
})
|
||||
|
||||
transforms = TransformSequence()
|
||||
|
@ -139,8 +144,9 @@ def fill_template(config, tasks):
|
|||
},
|
||||
'run': {
|
||||
'using': 'run-task',
|
||||
'checkout': False,
|
||||
'command': '/builds/worker/bin/get_and_diffoscope{}'.format(
|
||||
'checkout': task.get('unpack', False),
|
||||
'command': '/builds/worker/bin/get_and_diffoscope{}{}'.format(
|
||||
' --unpack' if task.get('unpack') else '',
|
||||
' --fail' if task.get('fail-on-diff') else '',
|
||||
),
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче