From c561f38c758ea2c4b81678d833054b06ddd091aa Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Wed, 10 Jun 2015 09:04:23 +0000 Subject: [PATCH] Unbreak prism-auto (after previous refactoring). git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9975 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/etc/scripts/prism-auto | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/prism/etc/scripts/prism-auto b/prism/etc/scripts/prism-auto index d6d7ee16..1be2192f 100755 --- a/prism/etc/scripts/prism-auto +++ b/prism/etc/scripts/prism-auto @@ -343,6 +343,10 @@ def benchmark(file, args, dir=""): # Expand output files to full paths args = expandFilenames(args, dir) + # Determine which out files apply to this benchmark from the -export switches (if required) + if not options.echo and options.test: + outFiles = getExpectedOutFilesFromArgs(args) + # Rename export files to avoid overriding out files # (if in test mode, and if not disabled) exportPrefix = 'tmp.' @@ -367,14 +371,11 @@ def benchmark(file, args, dir=""): runPrism(modelFileArg + args, dir) # Verify that exported files are correct (if required) - if not options.echo and options.test: - # Determine which out files apply to this benchmark from the -export switches - outFiles = getExpectedOutFilesFromArgs(args) - if outFiles: - # print "Out files to verify exports against: " + ' '.join(outFiles) - allEqual = verifyAndCleanupExports(outFiles, exportPrefix) - if (not allEqual) and (not options.testAll): - sys.exit(1) + if not options.echo and options.test and outFiles: + # print "Out files to verify exports against: " + ' '.join(outFiles) + allEqual = verifyAndCleanupExports(outFiles, exportPrefix) + if (not allEqual) and (not options.testAll): + sys.exit(1) # Execute benchmarking based on (possibly recursive) processing of a directory