Bug 1315657: Fix web-platform tests for Linux o Taskcluster. r=pmoore draft
authorWander Lairson Costa <wcosta@mozilla.com>
Mon, 07 Nov 2016 12:00:51 -0200
changeset 434820 aeaf9429519e3251e7d858af24e78ed60b74bced
parent 434636 908557c762f798605a2f96e4c943791cbada1b50
child 536127 8b76592b210d75bb228e870d6150ca41d364fda1
push id34838
push userwcosta@mozilla.com
push dateMon, 07 Nov 2016 14:01:18 +0000
reviewerspmoore
bugs1315657
milestone52.0a1
Bug 1315657: Fix web-platform tests for Linux o Taskcluster. r=pmoore Docker image for Linux tests ships minidump-stack-walk. The mozharness script finds it instead of tooltool downloaded file, and when try to give executable permission, it gets permission denied error because the file is localted outside home directory. As minidump-stack-walk already has executable permission, we skip the permission denied error. MozReview-Commit-ID: 5IyUna02iPb
testing/mozharness/mozharness/mozilla/testing/testbase.py
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py
+++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py
@@ -8,16 +8,17 @@
 import copy
 import os
 import platform
 import pprint
 import re
 import urllib2
 import json
 import socket
+import errno
 
 from mozharness.base.errors import BaseErrorList
 from mozharness.base.log import FATAL, WARNING
 from mozharness.base.python import (
     ResourceMonitoringMixin,
     VirtualenvMixin,
     virtualenv_config_options,
 )
@@ -752,17 +753,25 @@ Did you run with --create-virtualenv? Is
                     cache=c.get('tooltool_cache')
                 )
             except KeyError:
                 self.error('missing a required key.')
 
             abs_minidump_path = os.path.join(dirs['abs_work_dir'],
                                              minidump_stackwalk_path)
             if os.path.exists(abs_minidump_path):
-                self.chmod(abs_minidump_path, 0755)
+                try:
+                    self.chmod(abs_minidump_path, 0755)
+                except OSError as e:
+                    # docker image for Linux tests on Taskcluster already
+                    # ship minidump stackwalk. If mozharness finds it, it
+                    # won't have permission to modify bits. It is harmless,
+                    # however, because it already has executable permission.
+                    if e.errno != errno.EPERM:
+                        raise
                 self.minidump_stackwalk_path = abs_minidump_path
             else:
                 self.warning("minidump stackwalk path was given but couldn't be found. "
                              "Tried looking in '%s'" % abs_minidump_path)
                 # don't burn the job but we should at least turn them orange so it is caught
                 self.buildbot_status(TBPL_WARNING, WARNING)
 
         return self.minidump_stackwalk_path