Bug 826652 - Create the XML output path if it doesn't exist. r=jgriffin
authorDave Hunt <dhunt@mozilla.com>
Sun, 06 Jan 2013 22:24:16 -0500
changeset 126996 29fd39e0dde66646b0688c87b82d44aed79ca1ed
parent 126995 2678933d28ea23f477c2004af6613ba3d4d034e2
child 126997 fc560784e6cd519b432189aa89bdc9227304547f
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs826652
milestone20.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 826652 - Create the XML output path if it doesn't exist. r=jgriffin
testing/marionette/client/marionette/runtests.py
--- a/testing/marionette/client/marionette/runtests.py
+++ b/testing/marionette/client/marionette/runtests.py
@@ -363,16 +363,18 @@ 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))
             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