No bug - Fix a few issues in importTestsuite.py and update generated Makefiles; r=me
authorMs2ger <ms2ger@gmail.com>
Sat, 14 Apr 2012 15:05:33 +0200
changeset 94984 460f9c627f51384bc8e66bf3c4cdbf3855847841
parent 94983 be2de25cac2b11fc3f6b2e404dc52acb975d535e
child 94985 09ce4712ba364469604cd0f25edd4aa2b6f2ac43
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
milestone14.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
No bug - Fix a few issues in importTestsuite.py and update generated Makefiles; r=me
dom/tests/mochitest/w3c/Makefile.in
dom/tests/mochitest/w3c/html/tests/submission/Mozilla/Makefile.in
dom/tests/mochitest/w3c/importTestsuite.py
dom/tests/mochitest/w3c/webapps/DOMCore/tests/submissions/Opera/Makefile.in
--- a/dom/tests/mochitest/w3c/Makefile.in
+++ b/dom/tests/mochitest/w3c/Makefile.in
@@ -19,13 +19,13 @@ include $(topsrcdir)/config/rules.mk
 _SUPPORT_FILES = \
   testharness.js \
   testharnessreport.js \
   testharness.css \
   idlharness.js \
   WebIDLParser.js \
   $(NULL)
 
-testharnessreport.js: testharnessreport.js.in writeReporter.py 
+testharnessreport.js: testharnessreport.js.in writeReporter.py html.json webapps.json
 	$(PYTHON_PATH) $(srcdir)/writeReporter.py $<
 
 libs:: $(_SUPPORT_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/resources
--- a/dom/tests/mochitest/w3c/html/tests/submission/Mozilla/Makefile.in
+++ b/dom/tests/mochitest/w3c/html/tests/submission/Mozilla/Makefile.in
@@ -1,9 +1,9 @@
-# THIS FILE IS AUTOGENERATED - DO NOT EDIT
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
 
 DEPTH = ../../../../../../../..
 
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir = dom/tests/mochitest/w3c/html/tests/submission/Mozilla
 
--- a/dom/tests/mochitest/w3c/importTestsuite.py
+++ b/dom/tests/mochitest/w3c/importTestsuite.py
@@ -48,21 +48,22 @@ def getData(confFile):
 
 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:
     dirtocreate = dest
-    os.makedirs(d)
 
     subdirs, mochitests, supportfiles = parseManifestFile(dest, d)
     sourcedir = "hg-%s/%s" % (dest, d)
     destdir = "%s/%s" % (dest, d)
+    os.makedirs(destdir)
+
     for mochitest in mochitests:
       shutil.copy("%s/%s" % (sourcedir, mochitest), "%s/test_%s" % (destdir, mochitest))
     for support in supportfiles:
       shutil.copy("%s/%s" % (sourcedir, support), "%s/%s" % (destdir, support))
 
     if len(subdirs):
       importDirs(thissrcdir, dest, ["%s/%s" % (d, subdir) for subdir in subdirs])
 
@@ -134,19 +135,19 @@ def printMakefiles(thissrcdir, dest, dir
         "support": makefileString(supportfiles)
       })
 
     fp.write(result)
     fp.close()
 
 def hgadd(dest, directories):
   """Inform hg of the files in |directories|."""
-  print "hg adding..."
+  print "hg addremoving..."
   for d in directories:
-    subprocess.check_call(["hg", "add", "%s/%s" % (dest, d)])
+    subprocess.check_call(["hg", "addremove", "%s/%s" % (dest, d)])
 
 def importDirs(thissrcdir, dest, directories):
   copy(thissrcdir, dest, directories)
   printMakefiles(thissrcdir, dest, directories)
 
 def importRepo(confFile, thissrcdir):
   try:
     repo, dest, directories = getData(confFile)
@@ -165,12 +166,12 @@ def importRepo(confFile, thissrcdir):
     print "Removing %s again..." % hgdest
     subprocess.check_call(["rm", "--recursive", "--force", hgdest])
   except subprocess.CalledProcessError, e:
     print e.returncode
   finally:
     print "Done"
 
 if __name__ == "__main__":
-  if len(sys.argv) == 2:
+  if len(sys.argv) != 2:
     print "Need one argument."
   else:
     importRepo(sys.argv[1], "dom/tests/mochitest/w3c")
--- a/dom/tests/mochitest/w3c/webapps/DOMCore/tests/submissions/Opera/Makefile.in
+++ b/dom/tests/mochitest/w3c/webapps/DOMCore/tests/submissions/Opera/Makefile.in
@@ -1,9 +1,9 @@
-# THIS FILE IS AUTOGENERATED - DO NOT EDIT
+# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
 
 DEPTH = ../../../../../../../../..
 
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir = dom/tests/mochitest/w3c/webapps/DOMCore/tests/submissions/Opera