Bug 919391 - Fix gzip_xml.py not finding resource_timing_test0.xml r=jgraham
☠☠ backed out by fe960e54cc30 ☠ ☠
authorValentin Gosu <valentin.gosu@gmail.com>
Wed, 15 Feb 2017 19:58:49 +0100
changeset 343118 e776663ecbb4df20c2ed612cbaf5d5e2808ab6bb
parent 343117 1f80ab6a90a07605e8cf27f3ba9f608e8d095105
child 343119 c3a4bae5fc8db328f9f8559a65b28c235743bc10
push id31369
push userkwierso@gmail.com
push dateThu, 16 Feb 2017 00:18:40 +0000
treeherdermozilla-central@e9b926463f9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs919391
milestone54.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 919391 - Fix gzip_xml.py not finding resource_timing_test0.xml r=jgraham MozReview-Commit-ID: 97JUyEvzG1V
testing/web-platform/tests/resource-timing/resources/gzip_xml.py
--- a/testing/web-platform/tests/resource-timing/resources/gzip_xml.py
+++ b/testing/web-platform/tests/resource-timing/resources/gzip_xml.py
@@ -1,13 +1,15 @@
 import gzip as gzip_module
 from cStringIO import StringIO
+import os
 
 def main(request, response):
-    f = open('resource-timing/resources/resource_timing_test0.xml', 'r')
+    dir_path = os.path.dirname(os.path.realpath(__file__))
+    f = open(dir_path+'/resource_timing_test0.xml', 'r')
     output = f.read()
 
     out = StringIO()
     with gzip_module.GzipFile(fileobj=out, mode="w") as f:
       f.write(output)
     output = out.getvalue()
 
     headers = [("Content-type", "text/plain"),