Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
saul committed Apr 23, 2019
commit 9f7bcd60fa4ecc4195c8cd1a4a5e9d0710d63755
6 changes: 3 additions & 3 deletions tests/fsharpqa/Source/CompilerOptions/fsc/determinism/env.lst
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

# Confirm in normal not-deterministic mode, the same file compiled twice leads to different exes & pdbs
# NOTE: we need to use the timeout because non-determinism in fsc is due to datetime, so we need to guarentee at least 1 sec difference
SOURCE=dummy.fs PRECMD="\$FSC_PIPE dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"
SOURCE=dummy.fs SCFLAGS="--debug:full" PRECMD="\$FSC_PIPE --debug:full dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"
SOURCE=dummy.fs SCFLAGS="--debug:pdbonly" PRECMD="\$FSC_PIPE --debug:pdbonly dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"
SOURCE=dummy.fs PRECMD="\$FSC_PIPE dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"
SOURCE=dummy.fs SCFLAGS="--debug:full" PRECMD="\$FSC_PIPE --debug:full dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"
SOURCE=dummy.fs SCFLAGS="--debug:pdbonly" PRECMD="\$FSC_PIPE --debug:pdbonly dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"
SOURCE=dummy.fs SCFLAGS="--debug:portable" PRECMD="\$FSC_PIPE --debug:portable dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"
SOURCE=dummy.fs SCFLAGS="--debug:embedded" PRECMD="\$FSC_PIPE --debug:embedded dummy.fs && \$FSI_PIPE copyArtifacts.fsx" POSTCMD="\$FSI_PIPE --nologo --quiet --exec binaryCompare.fsx false"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ Copyright (c) Microsoft Corporation. All Rights Reserved.
--deterministic[+|-] Produce a deterministic assembly
(including module version GUID and
timestamp)
--pathmap:<path=sourcePath;...> Maps physical paths to source path
names output by the compiler
--crossoptimize[+|-] Enable or disable cross-module
optimizations

Expand Down
7 changes: 4 additions & 3 deletions tests/fsharpqa/run.fsharpqa.test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ let addToPath path =
if not(Array.contains path splits) then
setEnvVar "PATH" (path + (string Path.PathSeparator) + currentPath)

let nugetCache = Path.Combine(System.Environment.GetEnvironmentVariable "USERPROFILE", ".nuget", "packages")
let rootFolder = Path.Combine(__SOURCE_DIRECTORY__, "..", "..")
let compilerBinFolder = Path.Combine(rootFolder, releaseOrDebug, "net40", "bin")
setEnvVar "CSC_PIPE" (Path.Combine(rootFolder, "packages", "Microsoft.Net.Compilers.2.7.0", "tools", "csc.exe"))
let compilerBinFolder = Path.Combine(rootFolder, "artifacts", "bin", "fsc", releaseOrDebug, "net472")
setEnvVar "CSC_PIPE" (Path.Combine(nugetCache, "Microsoft.Net.Compilers", "2.7.0", "tools", "csc.exe"))
setEnvVar "FSC" (Path.Combine(compilerBinFolder, "fsc.exe"))
setEnvVar "FSCOREDLLPATH" (Path.Combine(compilerBinFolder, "FSharp.Core.dll"))
addToPath compilerBinFolder
Expand All @@ -35,7 +36,7 @@ let runPerl arguments =

use perlProcess =
ProcessStartInfo(
FileName = Path.Combine(rootFolder, "packages", "StrawberryPerl64.5.22.2.1", "Tools", "perl", "bin", "perl.exe"),
FileName = Path.Combine(nugetCache, "StrawberryPerl64", "5.22.2.1", "Tools", "perl", "bin", "perl.exe"),
Arguments = (arguments |> Array.map(fun a -> @"""" + a + @"""") |> String.concat " "),
WorkingDirectory = Path.Combine(rootFolder, "tests", "fsharpqa", "source"),
RedirectStandardOutput = true,
Expand Down