Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure core tests pick up fsharp.core nuget packages from artifacts build #6206

Merged
merged 2 commits into from
Feb 8, 2019
Merged
Changes from all commits
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
10 changes: 7 additions & 3 deletions tests/fsharp/single-test.fs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ let generateOverrides =
</Project>"
template

let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework configuration =
let computeSourceItems addDirectory addCondition (compileItem:CompileItem) sources =
let computeInclude src =
let fileName = if addDirectory then Path.Combine(pc.SourceDirectory, src) else src
Expand Down Expand Up @@ -130,6 +130,8 @@ let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
<DefineConstants>FX_RESHAPED_REFLECTION</DefineConstants>
<DefineConstants Condition=""'$(OutputType)' == 'Script' and '$(FSharpTestCompilerVersion)' == 'coreclr'"">NETCOREAPP</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RestoreAdditionalProjectSources Condition = "" '$(RestoreAdditionalProjectSources)' == ''"">$(RestoreFromArtifactsPath)</RestoreAdditionalProjectSources>
<RestoreAdditionalProjectSources Condition = "" '$(RestoreAdditionalProjectSources)' != ''"">$(RestoreAdditionalProjectSources);$(RestoreFromArtifactsPath)</RestoreAdditionalProjectSources>
</PropertyGroup>

<!-- Utility sources -->
Expand Down Expand Up @@ -170,6 +172,8 @@ let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
|> replaceTokens "$(OPTIMIZE)" optimize
|> replaceTokens "$(DEBUG)" debug
|> replaceTokens "$(TARGETFRAMEWORK)" targetFramework
|> replaceTokens "$(RestoreFromArtifactsPath)" (Path.GetFullPath(__SOURCE_DIRECTORY__) + "/../../artifacts/packages/" + configuration)
cartermp marked this conversation as resolved.
Show resolved Hide resolved

generateProjBody

let singleTestBuildAndRunCore cfg copyFiles p =
Expand Down Expand Up @@ -212,7 +216,7 @@ let singleTestBuildAndRunCore cfg copyFiles p =
let executeFsc testCompilerVersion targetFramework =
let propsBody = generateProps testCompilerVersion
emitFile propsFileName propsBody
let projectBody = generateProjectArtifacts pc targetFramework
let projectBody = generateProjectArtifacts pc targetFramework cfg.BUILD_CONFIG
emitFile projectFileName projectBody
use testOkFile = new FileGuard(Path.Combine(directory, "test.ok"))
exec { cfg with Directory = directory } cfg.DotNetExe (sprintf "run -f %s" targetFramework)
Expand All @@ -222,7 +226,7 @@ let singleTestBuildAndRunCore cfg copyFiles p =
let executeFsi testCompilerVersion targetFramework =
let propsBody = generateProps testCompilerVersion
emitFile propsFileName propsBody
let projectBody = generateProjectArtifacts pc targetFramework
let projectBody = generateProjectArtifacts pc targetFramework cfg.BUILD_CONFIG
emitFile projectFileName projectBody
use testOkFile = new FileGuard(Path.Combine(directory, "test.ok"))
exec { cfg with Directory = directory } cfg.DotNetExe "build /t:RunFSharpScript"
Expand Down