From f195cfcaa359816d42fb2ef99fe72ef5e5c7053a Mon Sep 17 00:00:00 2001 From: Lincoln Atkinson Date: Sun, 28 Feb 2016 16:14:02 -0800 Subject: [PATCH 1/2] Be more explicit about what version of FSharp.Core is copied where/when in cross-version tests --- .../MultiTargeting/MultiTargetMatrix.fsx | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/fsharpqa/Source/MultiTargeting/MultiTargetMatrix.fsx b/tests/fsharpqa/Source/MultiTargeting/MultiTargetMatrix.fsx index fb8f5a7269e..7f90ee19659 100644 --- a/tests/fsharpqa/Source/MultiTargeting/MultiTargetMatrix.fsx +++ b/tests/fsharpqa/Source/MultiTargeting/MultiTargetMatrix.fsx @@ -25,23 +25,29 @@ module Helpers = run compilerPath ["-o:consumer.exe"; "--noframework"; sprintf "\"-r:%s\"" runtime; "-r:author.dll"; source] let private consumerRunFsi fsiPath source = + let localFSharpCore = Path.Combine(Environment.CurrentDirectory, "FSharp.Core.dll") + if File.Exists(localFSharpCore) then + File.Delete(localFSharpCore) run fsiPath ["--exec"; source] + /// gets the version of the assembly at the specified path + let getVer dllPath = + let asm = Assembly.ReflectionOnlyLoadFrom(dllPath) + asm.GetName().Version.ToString() + // runs the consumer EXE, handling binding redirects automatically - let private consumerRunExe redirectVer = + let private consumerRunExe consumerRuntime = if File.Exists("consumer.exe.config") then File.Delete("consumer.exe.config") - + + let redirectVer = getVer consumerRuntime let content = File.ReadAllText("consumer.exe.config.txt").Replace("{ver}", redirectVer) - File.WriteAllText("consumer.exe.config", content) + File.WriteAllText("consumer.exe.config", content) + + File.Copy(consumerRuntime, Path.Combine(Environment.CurrentDirectory, "FSharp.Core.dll"), true) run "consumer.exe" [] - /// gets the version of the assembly at the specified path - let getVer dllPath = - let asm = Assembly.ReflectionOnlyLoadFrom(dllPath) - asm.GetName().Version.ToString() - /// runs through the end-to-end scenario of /// - Author uses [authorComiler] to build DLL targeting [authorRuntime] with source [authorSource] /// - Consumer uses [consumerCompiler] to build EXE ref'ing above DLL, building EXE targeting [consumerRuntime] with source [consumerSource] @@ -49,7 +55,7 @@ module Helpers = let testExe authorCompiler authorRuntime consumerCompiler consumerRuntime authorSource consumerSource = authorCompile authorCompiler authorRuntime authorSource consumerCompile consumerCompiler consumerRuntime consumerSource - consumerRunExe (getVer consumerRuntime) + consumerRunExe consumerRuntime /// runs through the end-to-end scenario of /// - Author uses [authorComiler] to build DLL targeting [authorRuntime] with source [authorSource] From e2ecca66399461c3d842d00923b5309900a624a2 Mon Sep 17 00:00:00 2001 From: Lincoln Atkinson Date: Sun, 28 Feb 2016 16:14:36 -0800 Subject: [PATCH 2/2] Remove exclusions for scenarios that now work with F# 4.0/4.1 --- tests/fsharpqa/Source/MultiTargeting/env.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fsharpqa/Source/MultiTargeting/env.lst b/tests/fsharpqa/Source/MultiTargeting/env.lst index dab52c34075..0bc5f2de1aa 100644 --- a/tests/fsharpqa/Source/MultiTargeting/env.lst +++ b/tests/fsharpqa/Source/MultiTargeting/env.lst @@ -5,6 +5,6 @@ NOMONO SOURCE=E_BadPathToFSharpCore.fsx SCFLAGS="--noframework -r %W # FSharp.Core is checked in for this test to verify a particular error message related to it. It shouldn't be accidentally picked up by other tests since it isn't in the working directory for them NOMONO SOURCE=E_UseBinaryIncompatibleLibrary.fs SCFLAGS="--noframework -r ..\\Common\\FSharp.Core.dll" # E_UseBinaryIncompatibleLibrary.fs -ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx QuotedCommaTypeName_author.fs QuotedCommaTypeName_consumer.fsx 0,8" # QuotedCommaTypeName +ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx QuotedCommaTypeName_author.fs QuotedCommaTypeName_consumer.fsx" # QuotedCommaTypeName ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx InlineCoreResource_author.fs InlineCoreResource_consumer.fsx" # InlineCoreResource ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx OptimizedForLoops_author.fs OptimizedForLoops_consumer.fsx" # OptimizedForLoops \ No newline at end of file