Bug 1623010 - Separate out the diffing of generated-files. r=dmajor

The diff jobs currently take a Firefox package and compares against the
one from another build. When that fails, it also makes the diff of the
generated files, which can be useful when there are differences, but
can also be useful on its own. Also, because sometimes, like right now,
there are differences in generated files that have no impact on Firefox
itself, when differences do show up for Firefox, the differences in
generated files are added noise that sheriffs can't work around.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2020-03-17 22:03:01 +00:00
parent 3a60ba6eba
commit 670494e7d5
3 changed files with 22 additions and 24 deletions

View File

@ -66,6 +66,14 @@ jobs:
fail-on-diff: true
run-on-projects: ['try', 'mozilla-central'] # Do not run linux32 on autoland, Bug 1599197
reproducible-linux32-generated-files:
symbol: Linux32g
artifact: target.generated-files.tar.gz
new: build-linux-reproduced/opt
original: build-linux-shippable/opt
fail-on-diff: true
run-on-projects: ['try', 'mozilla-central'] # Do not run linux32 on autoland, Bug 1599197
# Make a task for each diff we might want. The following are just examples,
# Both original and new can point to builds from the full set of tasks or

View File

@ -34,6 +34,10 @@ case "$ORIG_URL" in
$MOZ_FETCHES_DIR/dmg/hfsplus $i.hfs extractall / $i
done
;;
*)
ARTIFACT=$(basename "${ORIG_URL}")
curl -L "$ORIG_URL" > "a/${ARTIFACT}"
curl -L "$NEW_URL" > "b/${ARTIFACT}"
esac
case "$ORIG_URL" in
@ -124,26 +128,6 @@ then
# Ok
:
else
# The builds differ, let's check the generated files.
if curl -L -f "${ORIG_URL%/*}/target.generated-files.tar.gz" > a.generated-files.tar.gz && \
curl -L -f "${NEW_URL%/*}/target.generated-files.tar.gz" > b.generated-files.tar.gz
then
HAVE_GENERATED_FILES=1
else
HAVE_GENERATED_FILES=
fi
if test -z "$HAVE_GENERATED_FILES" || diffoscope \
--html generated-files.diff.html \
--text generated-files.diff.txt \
--progress \
--output-empty \
a.generated-files.tar.gz b.generated-files.tar.gz
then
report_error diff
else
report_error generated-files.diff
fi
report_error diff
$POST
fi

View File

@ -50,6 +50,11 @@ diff_description_schema = Schema({
# Fail the task when differences are detected.
Optional('fail-on-diff'): bool,
# What artifact to check the differences of. Defaults to target.tar.bz2
# for Linux, target.dmg for Mac, target.zip for Windows, target.apk for
# Android.
Optional('artifact'): text_type,
# 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).
@ -76,6 +81,7 @@ def fill_template(config, tasks):
deps = {}
urls = {}
previous_artifact = None
artifact = task.get('artifact')
for k in ('original', 'new'):
value = task[k]
if isinstance(value, text_type):
@ -100,7 +106,9 @@ def fill_template(config, tasks):
deps[index] = 'index-search-' + index
dep_name = index
os_hint = index.split('.')[-1]
if 'linux' in os_hint:
if artifact:
pass
elif 'linux' in os_hint:
artifact = 'target.tar.bz2'
elif 'macosx' in os_hint:
artifact = 'target.dmg'
@ -139,8 +147,6 @@ def fill_template(config, tasks):
} for f in (
'diff.html',
'diff.txt',
'generated-files.diff.html',
'generated-files.diff.txt',
)],
'env': {
'ORIG_URL': urls['original'],