From f57b1da87853c9ba121f49c9659f7129b8e30265 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Mon, 17 Dec 2012 00:24:10 +0000 Subject: [PATCH] Minor polishing in prism-auto script. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6209 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/etc/scripts/prism-auto | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/prism/etc/scripts/prism-auto b/prism/etc/scripts/prism-auto index 6cd2a867..b2fd1354 100755 --- a/prism/etc/scripts/prism-auto +++ b/prism/etc/scripts/prism-auto @@ -89,12 +89,11 @@ def getMatchingModelsInDir(dir, propertiesFile): # Get a list of properties in a directory, by searching for all files with an appropriate extension. # If a properties files "props.pctl" has a matching file "props.pctl.args", then the contents of this # are also appended. Multiple lines in the .args file results in multiple copies of the properties file. -# Each item of the returned list is itself a list because the model specification may be in several parts, +# Each item of the returned list is itself a list because the property specification may be in several parts, # e.g. ["props.pctl", "-const", "T=10"], but the first item is always the name of the properties file. def getPropertiesInDir(dir): propertiesFiles = [] - # Otherwise look for all properties files for file in os.listdir(dir): if os.path.isfile(os.path.join(dir, file)) and isPrismPropertiesFile(file): propertiesFiles.append(os.path.join(dir, file)) @@ -107,12 +106,11 @@ def getPropertiesInDir(dir): # Get a list of properties in a directory with prefix matching a model file name. # If a properties files "props.pctl" has a matching file "props.pctl.args", then the contents of this # are also appended. Multiple lines in the .args file results in multiple copies of the properties file. -# Each item of the returned list is itself a list because the model specification may be in several parts, +# Each item of the returned list is itself a list because the property specification may be in several parts, # e.g. ["props.pctl", "-const", "T=10"], but the first item is always the name of the properties file. def getMatchingPropertiesInDir(dir, modelFile): propertiesFiles = [] - # Otherwise look for all properties files for file in os.listdir(dir): if os.path.isfile(os.path.join(dir, file)) and isPrismPropertiesFile(file): if os.path.basename(os.path.join(dir, file)).startswith(os.path.basename(modelFile)): @@ -292,6 +290,7 @@ def benchmarkModelFile(modelFile): benchmark(modelFile + args) # Otherwise, find properties else: + # Find and benchmark properties if options.matching: propertiesFiles = getMatchingPropertiesInDir(dir, modelFile[0]) else: propertiesFiles = getPropertiesInDir(dir) for propertiesFile in propertiesFiles: