summaryrefslogtreecommitdiff
path: root/Source/DafnyDriver
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-05-29 21:41:00 +0200
committerGravatar wuestholz <unknown>2014-05-29 21:41:00 +0200
commit607ef28aadb281ab61a2be493a637126e967a388 (patch)
treeaae16c049c860e443920f9c6ee31af4e35f8a800 /Source/DafnyDriver
parentdc0a9130355352d0f47e07232d8119fc7219ccbc (diff)
Set up the same test infrastructure as in Boogie.
Diffstat (limited to 'Source/DafnyDriver')
-rw-r--r--Source/DafnyDriver/DafnyDriver.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/DafnyDriver/DafnyDriver.cs b/Source/DafnyDriver/DafnyDriver.cs
index ff2cbc8c..7d8c3fdb 100644
--- a/Source/DafnyDriver/DafnyDriver.cs
+++ b/Source/DafnyDriver/DafnyDriver.cs
@@ -90,6 +90,11 @@ namespace Microsoft.Dafny
Console.WriteLine("Press Enter to exit.");
Console.ReadLine();
}
+ if (CommandLineOptions.Clo.UseBaseNameForFileName && exitValue != ExitValue.PREPROCESSING_ERROR)
+ {
+ // TODO(wuestholz): We should probably add a separate flag for this. This is currently only used by the new testing infrastructure.
+ return 0;
+ }
return (int)exitValue;
}
@@ -322,9 +327,9 @@ namespace Microsoft.Dafny
outputWriter.WriteLine(e.ToString());
}
} else if (cr.Errors.Count == 0) {
- outputWriter.WriteLine("Compiled assembly into {0}", cr.PathToAssembly);
+ outputWriter.WriteLine("Compiled assembly into {0}", DafnyOptions.Clo.UseBaseNameForFileName ? Path.GetFileName(cr.PathToAssembly) : cr.PathToAssembly);
} else {
- outputWriter.WriteLine("Errors compiling program into {0}", cr.PathToAssembly);
+ outputWriter.WriteLine("Errors compiling program into {0}", DafnyOptions.Clo.UseBaseNameForFileName ? Path.GetFileName(cr.PathToAssembly) : cr.PathToAssembly);
foreach (var ce in cr.Errors) {
outputWriter.WriteLine(ce.ToString());
outputWriter.WriteLine();