Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
atomb committed Jan 9, 2024
1 parent 575e8f1 commit f986ba0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Source/IntegrationTests/LitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class LitTests {

private static readonly string RepositoryRoot = Path.GetFullPath("../../../../../"); // Up from Source/IntegrationTests/bin/Debug/net6.0/

private static readonly string[] DefaultBoogieArguments;

private static readonly LitTestConfiguration Config;

static LitTests() {
Expand Down Expand Up @@ -65,10 +63,10 @@ IEnumerable<string> AddExtraArgs(IEnumerable<string> args, IEnumerable<string> l
{ "%repositoryRoot", RepositoryRoot.Replace(@"\", "/") },
};

DefaultBoogieArguments =
var defaultBoogieArguments =
File.ReadAllLines(RepositoryRoot + "Source/boogie-args.cfg")
.Select(arg => "-" + arg)
.Append("/proverOpt:PROVER_PATH:" + RepositoryRoot + $"../unzippedRelease/dafny/z3/bin/z3-{DafnyOptions.DefaultZ3Version}")
.Append("-proverOpt:PROVER_PATH:" + RepositoryRoot + $"../unzippedRelease/dafny/z3/bin/z3-{DafnyOptions.DefaultZ3Version}")
.ToArray();

var commands = new Dictionary<string, Func<IEnumerable<string>, LitTestConfiguration, ILitCommand>> {
Expand Down Expand Up @@ -114,7 +112,7 @@ IEnumerable<string> AddExtraArgs(IEnumerable<string> args, IEnumerable<string> l
}, {
"%boogie", (args, config) => // TODO
new DotnetToolCommand("boogie",
args.Concat(DefaultBoogieArguments),
args.Concat(defaultBoogieArguments),
config.PassthroughEnvironmentVariables)
}, {
"%diff", (args, config) => DiffCommand.Parse(args.ToArray())
Expand Down Expand Up @@ -168,7 +166,7 @@ IEnumerable<string> AddExtraArgs(IEnumerable<string> args, IEnumerable<string> l
new ShellLitCommand(Path.Join(dafnyReleaseDir, "DafnyServer"), args, config.PassthroughEnvironmentVariables);
commands["%boogie"] = (args, config) =>
new DotnetToolCommand("boogie",
args.Concat(DefaultBoogieArguments),
args.Concat(defaultBoogieArguments),
config.PassthroughEnvironmentVariables);
substitutions["%z3"] = Path.Join(dafnyReleaseDir, "z3", "bin", $"z3-{DafnyOptions.DefaultZ3Version}");
}
Expand Down

0 comments on commit f986ba0

Please sign in to comment.