Browse Source

imported patch prism-auto--property-list-file-with-arguments.patch

tud-infrastructure-2018-10-12
Joachim Klein 7 years ago
parent
commit
8a8f39d70a
  1. 21
      prism/etc/scripts/prism-auto

21
prism/etc/scripts/prism-auto

@ -932,7 +932,7 @@ def benchmarkAutoFile(autoFile):
#
# * propertiesFile: name of the properties file (as a string)
def benchmarkPropertiesFile(propertiesFile):
def benchmarkPropertiesFile(propertiesFile, extraArgs):
logging.debug("Benchmarking properties file " + propertiesFile)
dir = os.path.dirname(propertiesFile)
if dir == "": dir = "."
@ -949,7 +949,7 @@ def benchmarkPropertiesFile(propertiesFile):
for modelFile in modelFiles:
# Expand model based on any .args file, too
for modelArgs in getMatchingArgListsForFile(modelFile[0]):
benchmark(modelFile[0], modelFile[1] + modelArgs + [propertiesFile] + args, dir)
benchmark(modelFile[0], modelFile[1] + modelArgs + [propertiesFile] + args + extraArgs, dir)
# Execute benchmarking based on a property list.
# A property list is a file containing pairs of the form <dir>, <prop> where:
@ -966,11 +966,20 @@ def benchmarkPropListFile(propListFile):
for line in open(propListFile, 'r').readlines():
line = line.strip()
if len(line) == 0 or lineIsCommentedOut(line): continue
items = line.split(',')
dir = os.path.join(listDir, items[0].strip())
m = re.match('(.+?),(.+?)(,(.+))?$', line);
if m is None:
print("Malformed line in property list file " + propListFile + ": "+line)
return
modelSpec = m.group(1)
dir = os.path.join(listDir, modelSpec.strip())
dir = os.path.realpath(dir)
propFile = items[1].strip()
benchmarkPropertiesFile(os.path.join(dir, propFile))
propFile = m.group(2).strip()
extraArgSpec = m.group(4)
if extraArgSpec is None:
benchmarkPropertiesFile(os.path.join(dir, propFile), [])
else:
extraArgs = extraArgSpec.split()
benchmarkPropertiesFile(os.path.join(dir, propFile), extraArgs)
# (Re-)start the nailgun server
# We first try to stop an existing server (which should fail quickly if there is none running)

Loading…
Cancel
Save