Bug 1239880 - Don't copy thousands of web-platform test files to objdir; r?chmanchester draft
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 15 Jan 2016 20:09:12 -0800
changeset 322181 f1f662fd841e4d0d65f3f66ccbbef0bda6389fa0
parent 322175 9879757aa0d4f88df8c79cde4a777ac7eff0152f
child 513054 d301b37421261c5dc163f47b0a72a410c93e49a2
push id9552
push usergszorc@mozilla.com
push dateSat, 16 Jan 2016 04:12:17 +0000
reviewerschmanchester
bugs1239880
milestone46.0a1
Bug 1239880 - Don't copy thousands of web-platform test files to objdir; r?chmanchester AFAICT, we don't actually access web-platform test files from the objdir for anything except test packaging. And we already have a mechanism for creating test archives from files directly in the source directory. So, let's stop copying them to the objdir and package them directly from the source directory! The _tests install manifest reports the following change: before: 41,977 files installed after: 24,537 files installed delta: -17,440 files We still copy some WPT files to the objdir. We might be able to eliminate these as well. However, since there are only ~200 files, I'm not too concerned. I manually compared the resulting web-platform zip archives from before and after. No files were removed from the archive. However, the new archive does gain several hundred empty directories with .gitkeep files. This feels weird, but it shouldn't break anything (I would think). I'm inclined to leave them for now. I'll file a follow-up bug to deal with them (preferably by removing them from version control).
python/mozbuild/mozbuild/action/test_archive.py
testing/web-platform/moz.build
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -197,16 +197,31 @@ ARCHIVE_FILES = {
         {
             'source': buildconfig.topsrcdir,
             'base': 'testing',
             'pattern': 'talos/**',
         },
     ],
     'web-platform': [
         {
+            'source': buildconfig.topsrcdir,
+            'base': 'testing',
+            'pattern': 'web-platform/meta/**',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'testing',
+            'pattern': 'web-platform/mozilla/**',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'testing',
+            'pattern': 'web-platform/tests/**',
+        },
+        {
             'source': buildconfig.topobjdir,
             'base': '_tests',
             'pattern': 'web-platform/**',
         },
         {
             'source': buildconfig.topobjdir,
             'base': '',
             'pattern': 'mozinfo.json',
--- a/testing/web-platform/moz.build
+++ b/testing/web-platform/moz.build
@@ -6,21 +6,18 @@
 
 WEB_PLATFORM_TESTS_MANIFESTS += [
     ('meta/MANIFEST.json', 'tests/'),
     ('mozilla/meta/MANIFEST.json', 'mozilla/tests/')
 ]
 
 TEST_HARNESS_FILES['web-platform'] += [
     'harness/**',
-    'meta/**',
-    'mozilla/**',
     'outbound/**',
     'runtests.py',
-    'tests/**',
     'wptrunner.ini'
 ]
 
 TEST_HARNESS_FILES['web-platform'].certs = [
     'certs/cacert.pem',
     'certs/web-platform.test.key',
     'certs/web-platform.test.pem',
 ]