From f986ba08bf01dd0b65d5859359d4cffb5628aa83 Mon Sep 17 00:00:00 2001 From: Aaron Tomb Date: Mon, 8 Jan 2024 16:40:43 -0800 Subject: [PATCH] Minor cleanup --- Source/IntegrationTests/LitTests.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/IntegrationTests/LitTests.cs b/Source/IntegrationTests/LitTests.cs index f7ec1d45bd..84d69adb6d 100644 --- a/Source/IntegrationTests/LitTests.cs +++ b/Source/IntegrationTests/LitTests.cs @@ -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() { @@ -65,10 +63,10 @@ IEnumerable AddExtraArgs(IEnumerable args, IEnumerable 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, LitTestConfiguration, ILitCommand>> { @@ -114,7 +112,7 @@ IEnumerable AddExtraArgs(IEnumerable args, IEnumerable l }, { "%boogie", (args, config) => // TODO new DotnetToolCommand("boogie", - args.Concat(DefaultBoogieArguments), + args.Concat(defaultBoogieArguments), config.PassthroughEnvironmentVariables) }, { "%diff", (args, config) => DiffCommand.Parse(args.ToArray()) @@ -168,7 +166,7 @@ IEnumerable AddExtraArgs(IEnumerable args, IEnumerable 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}"); }