Bug 1239738 - Handle artifact builds with no test binaries cleanly. r?ahunt
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -118,19 +118,19 @@ class ArtifactJob(object):
if self._log:
self._log(*args, **kwargs)
def find_candidate_artifacts(self, artifacts):
# TODO: Handle multiple artifacts, taking the latest one.
tests_artifact = None
for artifact in artifacts:
name = artifact['name']
- if self._package_re.match(name):
+ if self._package_re and self._package_re.match(name):
yield name
- elif self._tests_re.match(name):
+ elif self._tests_re and self._tests_re.match(name):
tests_artifact = name
yield name
else:
self.log(logging.DEBUG, 'artifact',
{'name': name},
'Not yielding artifact named {name} as a candidate artifact')
if self._tests_re and not tests_artifact:
raise ValueError('Expected tests archive matching "{re}", but '