Skip to content

Commit

Permalink
Allow per-suite specific fields in suite.py
Browse files Browse the repository at this point in the history
Allow every suite to store suite private metadata in suite.py.
An example would be:

"graal-core:required_db_version" : "1.0"

and assuming s is the suite object for graal-core the extension attribute is accessed as:

s.required_db_version

This includes a patch from Doug.

Corrected version number for this new minor release
  • Loading branch information
Juergen Christ committed Feb 16, 2016
1 parent a194746 commit 82b96e1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -4777,7 +4777,16 @@ def expand(value, context):
if javacLintOverrides:
self.javacLintOverrides = javacLintOverrides.split(',')

unknown = frozenset(d.keys()) - frozenset(supported)
unknown = set(d.keys()) - frozenset(supported)

suiteExtensionAttributePrefix = self.name + ':'
suiteSpecific = {n[len(suiteExtensionAttributePrefix):] : d[n] for n in d.iterkeys() if n.startswith(suiteExtensionAttributePrefix) and n != suiteExtensionAttributePrefix}
for n, v in suiteSpecific.iteritems():
if hasattr(self, n):
abort('Cannot override built-in suite attribute "' + n + '"', context=self)
setattr(self, n, v)
unknown.remove(suiteExtensionAttributePrefix + n)

if unknown:
abort(modulePath + ' defines unsupported suite attribute: ' + ', '.join(unknown))

Expand Down Expand Up @@ -12339,7 +12348,7 @@ def alarm_handler(signum, frame):
# no need to show the stack trace when the user presses CTRL-C
abort(1)

version = VersionSpec("5.7.1")
version = VersionSpec("5.8.0")

currentUmask = None

Expand Down

0 comments on commit 82b96e1

Please sign in to comment.