Bug 829790 - Marionette client's XML report fails when path does not contain a directory. r=jgriffin
authorDave Hunt <dhunt@mozilla.com>
Mon, 14 Jan 2013 20:15:03 -0500
changeset 118841 49007a675939b70d2c2fdee0c3d7850f6921c808
parent 118840 4966fa10cf1da556ef0e5169156d007b48d6b62f
child 118842 aa336551620e802ac5976d5394eaa126b54ca4c1
push id24180
push useremorley@mozilla.com
push dateTue, 15 Jan 2013 22:58:27 +0000
treeherdermozilla-central@72e34ce7fd92 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs829790
milestone21.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 829790 - Marionette client's XML report fails when path does not contain a directory. r=jgriffin
testing/marionette/client/marionette/runtests.py
--- a/testing/marionette/client/marionette/runtests.py
+++ b/testing/marionette/client/marionette/runtests.py
@@ -363,18 +363,19 @@ class MarionetteTestRunner(object):
         if self.perfrequest and options.perf:
             try:
                 self.perfrequest.submit()
             except Exception, e:
                 print "Could not submit to datazilla"
                 print e
 
         if self.xml_output:
-            if not os.path.exists(os.path.dirname(self.xml_output)):
-                os.makedirs(os.path.dirname(self.xml_output))
+            xml_dir = os.path.dirname(os.path.abspath(self.xml_output))
+            if not os.path.exists(xml_dir):
+                os.makedirs(xml_dir)
             with open(self.xml_output, 'w') as f:
                 f.write(self.generate_xml(self.results))
 
         if self.marionette.instance:
             self.marionette.instance.close()
             self.marionette.instance = None
         del self.marionette