Merge m-c to inbound.
authorRyan VanderMeulen <>
Mon, 12 Nov 2012 19:46:27 -0500
changeset 113042 c958c734e3d3580033d33fb406db26e53c646c94
parent 113041 e08357289bedc9c2ba253c7d5b3b82ac40402624 (current diff)
parent 112979 b857905d82b45456853866330c98b372b14f20db (diff)
child 113043 0c3592db8b447ac3a6a6dba2e0fa0f7434e5bb96
push id23848
push dateTue, 13 Nov 2012 16:29:34 +0000
treeherdermozilla-central@d56d537a1843 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
Merge m-c to inbound.
--- a/dom/imptests/
+++ b/dom/imptests/
@@ -15,16 +15,18 @@ from __future__ import print_function, u
 import os
 import shutil
 import subprocess
 import sys
 import parseManifest
 import writeMakefile
+HEADERS_SUFFIX = "^headers^"
 def parseManifestFile(dest, dir):
   subdirs, mochitests, _, __, supportfiles = parseManifest.parseManifestFile("hg-%s/%s/MANIFEST" % (dest, dir))
   return subdirs, mochitests, supportfiles
 def getData(confFile):
   """This function parses a file of the form
   URL of remote repository|Name of the destination directory
   First directory of tests
@@ -49,31 +51,38 @@ def getData(confFile):
     return repo, dest, directories
 def makePath(a, b):
   if not b:
     # Empty directory, i.e., the repository root.
     return a
   return "%s/%s" % (a, b)
+def copyTest(source, dest):
+  """Copy the file at source to dest, as well as any ^headers^ file associated
+  with it."""
+  shutil.copy(source, dest)
+  if os.path.exists(source + HEADERS_SUFFIX):
+    shutil.copy(source + HEADERS_SUFFIX, dest + HEADERS_SUFFIX)
 def copy(thissrcdir, dest, directories):
   """Copy mochitests and support files from the external HG directory to their
   place in mozilla-central.
   print("Copying %s..." % directories)
   for d in directories:
     subdirs, mochitests, supportfiles = parseManifestFile(dest, d)
     sourcedir = makePath("hg-%s" % dest, d)
     destdir = makePath(dest, d)
     for mochitest in mochitests:
-      shutil.copy("%s/%s" % (sourcedir, mochitest), "%s/test_%s" % (destdir, mochitest))
+      copyTest("%s/%s" % (sourcedir, mochitest), "%s/test_%s" % (destdir, mochitest))
     for support in supportfiles:
-      shutil.copy("%s/%s" % (sourcedir, support), "%s/%s" % (destdir, support))
+      copyTest("%s/%s" % (sourcedir, support), "%s/%s" % (destdir, support))
     if len(subdirs):
       if d:
         importDirs(thissrcdir, dest, ["%s/%s" % (d, subdir) for subdir in subdirs])
         # Empty directory, i.e., the repository root
         importDirs(thissrcdir, dest, subdirs)
@@ -97,16 +106,17 @@ def printMakefiles(thissrcdir, dest, dir
   for d in directories:
     path = makePath(dest, d)
     print("Creating in %s..." % path)
     subdirs, mochitests, supportfiles = parseManifestFile(dest, d)
     files = ["test_%s" % (mochitest, ) for mochitest in mochitests]
+    files.extend(f for f in os.listdir(path) if f.endswith(HEADERS_SUFFIX))
     result = writeMakefile.substMakefile("", subdirs, files)
     fp = open(path + "/", "w")
 def hgadd(dest, directories):