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
--- 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