Bug 1582662 - Fix xpcshell test suites against artifact builds on try. r=chmanchester
authorNick Alexander <nalexander@mozilla.com>
Mon, 23 Sep 2019 21:47:42 +0000
changeset 494615 c1c08992d48b6feb90515ae1627fd34890534e34
parent 494614 3350ec10023764430fa41b6efc3ce4333d15370c
child 494616 b4ec351c24c65dd4680771affe7a5a7e54f52e42
push id96117
push usernalexander@mozilla.com
push dateMon, 23 Sep 2019 22:30:33 +0000
treeherderautoland@c1c08992d48b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1582662, 1580996
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1582662 - Fix xpcshell test suites against artifact builds on try. r=chmanchester Bug 1580996 cleaned up handling of `{application,platform}.ini` but inadvertently populated `.ini` files from test archives into the object directory. That causes issues, especially on try. Test INI files should come from the local artifact build and not from the upstream test archives. Rather than re-instate the test at the time when processed test archives are _unpacked_, the test is done as test archives are packed/processed. Differential Revision: https://phabricator.services.mozilla.com/D46862
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -228,16 +228,25 @@ class ArtifactJob(object):
                     destpath = mozpath.join(dest_prefix, destpath)
                     self.log(logging.INFO, 'artifact',
                              {'destpath': destpath},
                              'Adding {destpath} to processed archive')
                     mode = entry['external_attr'] >> 16
                     writer.add(destpath.encode('utf-8'), reader[filename], mode=mode)
                     added_entry = True
                     break
+
+                if filename.endswith('.ini'):
+                    # The artifact build writes test .ini files into the object
+                    # directory; they don't come from the upstream test archive.
+                    self.log(logging.INFO, 'artifact',
+                             {'filename': filename},
+                             'Skipping test INI file {filename}')
+                    continue
+
                 for files_entry in OBJDIR_TEST_FILES.values():
                     origin_pattern = files_entry['pattern']
                     leaf_filename = filename
                     if 'dest' in files_entry:
                         dest = files_entry['dest']
                         origin_pattern = mozpath.join(dest, origin_pattern)
                         leaf_filename = filename[len(dest) + 1:]
                     if mozpath.match(filename, origin_pattern):
@@ -265,16 +274,25 @@ class ArtifactJob(object):
                         destpath = mozpath.join(dest_prefix, destpath)
                         self.log(logging.INFO, 'artifact',
                                  {'destpath': destpath},
                                  'Adding {destpath} to processed archive')
                         mode = entry.mode
                         writer.add(destpath.encode('utf-8'), entry.open(), mode=mode)
                         added_entry = True
                         break
+
+                    if filename.endswith('.ini'):
+                        # The artifact build writes test .ini files into the object
+                        # directory; they don't come from the upstream test archive.
+                        self.log(logging.INFO, 'artifact',
+                                 {'filename': filename},
+                                 'Skipping test INI file {filename}')
+                        continue
+
                     for files_entry in OBJDIR_TEST_FILES.values():
                         origin_pattern = files_entry['pattern']
                         leaf_filename = filename
                         if 'dest' in files_entry:
                             dest = files_entry['dest']
                             origin_pattern = mozpath.join(dest, origin_pattern)
                             leaf_filename = filename[len(dest) + 1:]
                         if mozpath.match(filename, origin_pattern):