From c3bd656cc7efe44812fb2bf15418978d2521976c Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Wed, 10 Jun 2015 08:42:15 +0000 Subject: [PATCH] Fix in prism-auto: do not rename export files unless in test mode. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9973 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/etc/scripts/prism-auto | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/prism/etc/scripts/prism-auto b/prism/etc/scripts/prism-auto index 750878b5..59b68f24 100755 --- a/prism/etc/scripts/prism-auto +++ b/prism/etc/scripts/prism-auto @@ -344,8 +344,9 @@ def benchmark(file, args, dir=""): args = expandFilenames(args, dir) # Rename export files to avoid overriding out files + # (if in test mode, and if not disabled) exportPrefix = 'tmp.' - if (not options.noRenaming): + if (options.test and not options.noRenaming): args = renameExports(exportPrefix, args) # print '\033[94m' + "EXECUTING BENCHMARK" + '\033[0m' @@ -366,13 +367,14 @@ def benchmark(file, args, dir=""): runPrism(modelFileArg + args, dir) # Verify that exported files are correct (if required) - if not options.echo and outFiles and options.test: + if not options.echo and options.test: # Determine which out files apply to this benchmark from the -export switches outFiles = getExpectedOutFilesFromArgs(args) - # print "Out files to verify exports against: " + ' '.join(outFiles) - allEqual = verifyAndCleanupExports(outFiles, exportPrefix) - if (not allEqual) and (not options.testAll): - sys.exit(1) + 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) # Execute benchmarking based on (possibly recursive) processing of a directory