2016-02-15 18:07:39 +00:00
|
|
|
|
using System;
|
2016-02-02 18:04:50 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Runtime.InteropServices;
|
2016-02-15 18:07:39 +00:00
|
|
|
|
using Microsoft.DotNet.Cli.Build.Framework;
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
|
|
|
|
using static Microsoft.DotNet.Cli.Build.FS;
|
|
|
|
|
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
2016-02-15 18:07:39 +00:00
|
|
|
|
using static Microsoft.DotNet.Cli.Build.Utils;
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Build
|
|
|
|
|
{
|
|
|
|
|
public class TestTargets
|
|
|
|
|
{
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
private static string s_testPackageBuildVersionSuffix = "<buildversion>";
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
|
|
|
|
public static readonly string[] TestProjects = new[]
|
|
|
|
|
{
|
2016-04-17 08:42:36 +00:00
|
|
|
|
"dotnet-new.Tests",
|
2016-05-24 14:35:58 +00:00
|
|
|
|
// TODO: https://github.com/dotnet/cli/issues/3216
|
|
|
|
|
//"Kestrel.Tests",
|
2016-05-16 22:30:53 +00:00
|
|
|
|
//"Microsoft.DotNet.Cli.Utils.Tests",
|
|
|
|
|
//"Microsoft.DotNet.Compiler.Common.Tests",
|
|
|
|
|
// "Microsoft.DotNet.ProjectModel.Tests",
|
|
|
|
|
// "Microsoft.Extensions.DependencyModel.Tests",
|
|
|
|
|
// "Performance"
|
2016-02-02 18:04:50 +00:00
|
|
|
|
};
|
2016-04-08 22:33:32 +00:00
|
|
|
|
|
2016-04-21 20:41:22 +00:00
|
|
|
|
public static readonly string[] WindowsTestProjects = new[]
|
|
|
|
|
{
|
|
|
|
|
"binding-redirects.Tests"
|
|
|
|
|
};
|
|
|
|
|
|
2016-03-28 11:18:59 +00:00
|
|
|
|
public static readonly dynamic[] ConditionalTestAssets = new[]
|
|
|
|
|
{
|
2016-04-08 22:33:32 +00:00
|
|
|
|
new { Path = "AppWithDirectDependencyDesktopAndPortable", Skip = new Func<bool>(() => !CurrentPlatform.IsWindows) }
|
2016-03-28 11:18:59 +00:00
|
|
|
|
};
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
[Target(
|
2016-04-08 22:33:32 +00:00
|
|
|
|
nameof(PrepareTargets.Init),
|
|
|
|
|
nameof(SetupTests),
|
|
|
|
|
nameof(RestoreTests),
|
|
|
|
|
nameof(BuildTests),
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
nameof(RunTests),
|
|
|
|
|
nameof(ValidateDependencies))]
|
2016-02-02 18:04:50 +00:00
|
|
|
|
public static BuildTargetResult Test(BuildTargetContext c) => c.Success();
|
|
|
|
|
|
2016-02-17 07:36:50 +00:00
|
|
|
|
[Target(nameof(SetupTestPackages), nameof(SetupTestProjects))]
|
2016-02-02 18:04:50 +00:00
|
|
|
|
public static BuildTargetResult SetupTests(BuildTargetContext c) => c.Success();
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-03-28 23:54:06 +00:00
|
|
|
|
[Target(nameof(RestoreTestAssetPackages), nameof(BuildTestAssetPackages))]
|
2016-02-17 07:36:50 +00:00
|
|
|
|
public static BuildTargetResult SetupTestPackages(BuildTargetContext c) => c.Success();
|
|
|
|
|
|
2016-04-21 20:41:22 +00:00
|
|
|
|
[Target(nameof(RestoreTestAssetProjects),
|
|
|
|
|
nameof(RestoreDesktopTestAssetProjects),
|
|
|
|
|
nameof(BuildTestAssetProjects),
|
2016-04-19 00:46:27 +00:00
|
|
|
|
nameof(BuildDesktopTestAssetProjects))]
|
2016-02-17 07:36:50 +00:00
|
|
|
|
public static BuildTargetResult SetupTestProjects(BuildTargetContext c) => c.Success();
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
|
|
|
|
[Target]
|
2016-02-17 07:36:50 +00:00
|
|
|
|
public static BuildTargetResult RestoreTestAssetPackages(BuildTargetContext c)
|
2016-02-02 18:04:50 +00:00
|
|
|
|
{
|
|
|
|
|
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "src"));
|
|
|
|
|
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "test"));
|
|
|
|
|
|
|
|
|
|
CleanNuGetTempCache();
|
|
|
|
|
|
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
2016-05-16 22:30:53 +00:00
|
|
|
|
dotnet.Restore("--verbosity", "verbose")
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestPackages"))
|
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-02-02 18:04:50 +00:00
|
|
|
|
[Target]
|
2016-02-17 07:36:50 +00:00
|
|
|
|
public static BuildTargetResult RestoreTestAssetProjects(BuildTargetContext c)
|
2016-02-16 19:26:40 +00:00
|
|
|
|
{
|
2016-02-17 07:36:50 +00:00
|
|
|
|
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "src"));
|
|
|
|
|
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "test"));
|
|
|
|
|
|
|
|
|
|
CleanNuGetTempCache();
|
|
|
|
|
|
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
dotnet.Restore(
|
2016-05-18 02:44:18 +00:00
|
|
|
|
"--verbosity", "verbose",
|
2016-05-16 22:30:53 +00:00
|
|
|
|
"--fallbacksource", Dirs.TestPackages)
|
2016-02-17 07:51:56 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects"))
|
2016-04-08 03:08:17 +00:00
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
|
|
|
|
|
2016-02-18 00:49:34 +00:00
|
|
|
|
// The 'ProjectModelServer' directory contains intentionally-unresolved dependencies, so don't check for success. Also, suppress the output
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
dotnet.Restore(
|
2016-04-04 16:11:15 +00:00
|
|
|
|
"--verbosity", "verbose",
|
2016-05-16 22:30:53 +00:00
|
|
|
|
"--infer-runtimes")
|
2016-03-01 06:09:38 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectModelServer", "DthTestProjects"))
|
|
|
|
|
.Execute();
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
dotnet.Restore(
|
2016-04-04 16:11:15 +00:00
|
|
|
|
"--verbosity", "verbose",
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
"--infer-runtimes")
|
2016-03-01 06:09:38 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectModelServer", "DthUpdateSearchPathSample"))
|
2016-02-18 00:49:34 +00:00
|
|
|
|
.Execute();
|
2016-02-17 07:36:50 +00:00
|
|
|
|
|
2016-02-16 19:26:40 +00:00
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-28 11:18:59 +00:00
|
|
|
|
[Target]
|
|
|
|
|
[BuildPlatforms(BuildPlatform.Windows)]
|
|
|
|
|
public static BuildTargetResult RestoreDesktopTestAssetProjects(BuildTargetContext c)
|
|
|
|
|
{
|
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
|
|
|
|
|
2016-04-08 22:33:32 +00:00
|
|
|
|
dotnet.Restore("--verbosity", "verbose",
|
2016-04-04 16:11:15 +00:00
|
|
|
|
"--infer-runtimes",
|
2016-05-16 22:30:53 +00:00
|
|
|
|
"--fallbacksource", Dirs.TestPackages)
|
2016-03-28 11:18:59 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "DesktopTestProjects"))
|
|
|
|
|
.Execute().EnsureSuccessful();
|
2016-04-08 22:33:32 +00:00
|
|
|
|
|
2016-03-28 11:18:59 +00:00
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
[Target(nameof(CleanTestPackages), nameof(CleanProductPackages))]
|
2016-02-17 07:36:50 +00:00
|
|
|
|
public static BuildTargetResult BuildTestAssetPackages(BuildTargetContext c)
|
2016-02-02 18:04:50 +00:00
|
|
|
|
{
|
2016-03-09 19:36:16 +00:00
|
|
|
|
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestPackages"));
|
|
|
|
|
|
2016-02-02 18:04:50 +00:00
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
|
|
|
|
|
|
|
|
|
Rmdir(Dirs.TestPackages);
|
|
|
|
|
Mkdirp(Dirs.TestPackages);
|
|
|
|
|
|
2016-04-20 23:50:11 +00:00
|
|
|
|
foreach (var testPackageProject in TestPackageProjects.Projects.Where(p => p.IsApplicable))
|
2016-02-02 18:04:50 +00:00
|
|
|
|
{
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
var relativePath = testPackageProject.Path;
|
|
|
|
|
|
|
|
|
|
var versionSuffix = testPackageProject.VersionSuffix;
|
|
|
|
|
if (versionSuffix.Equals(s_testPackageBuildVersionSuffix))
|
|
|
|
|
{
|
2016-05-05 17:51:58 +00:00
|
|
|
|
versionSuffix = c.BuildContext.Get<BuildVersion>("BuildVersion").CommitCountString;
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
}
|
2016-04-08 22:33:32 +00:00
|
|
|
|
|
2016-03-27 00:16:39 +00:00
|
|
|
|
var fullPath = Path.Combine(c.BuildContext.BuildDirectory, relativePath.Replace('/', Path.DirectorySeparatorChar));
|
2016-02-15 17:42:17 +00:00
|
|
|
|
c.Info($"Packing: {fullPath}");
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
|
2016-04-20 23:50:11 +00:00
|
|
|
|
var packageBuildFrameworks = testPackageProject.Frameworks.ToList();
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
|
2016-04-20 23:50:11 +00:00
|
|
|
|
if (!CurrentPlatform.IsWindows)
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
{
|
2016-04-20 23:50:11 +00:00
|
|
|
|
packageBuildFrameworks.RemoveAll(f => f.StartsWith("net4"));
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (var packageBuildFramework in packageBuildFrameworks)
|
|
|
|
|
{
|
|
|
|
|
var buildArgs = new List<string>();
|
|
|
|
|
buildArgs.Add("-f");
|
|
|
|
|
buildArgs.Add(packageBuildFramework);
|
|
|
|
|
buildArgs.Add("--build-base-path");
|
|
|
|
|
buildArgs.Add(Dirs.TestPackagesBuild);
|
|
|
|
|
buildArgs.Add(fullPath);
|
|
|
|
|
|
|
|
|
|
Mkdirp(Dirs.TestPackagesBuild);
|
2016-04-20 23:50:11 +00:00
|
|
|
|
dotnet.Build(buildArgs.ToArray())
|
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
}
|
2016-04-08 22:33:32 +00:00
|
|
|
|
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
var projectJson = Path.Combine(fullPath, "project.json");
|
2016-04-08 22:33:32 +00:00
|
|
|
|
var dotnetPackArgs = new List<string> {
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
projectJson,
|
|
|
|
|
"--no-build",
|
|
|
|
|
"--build-base-path", Dirs.TestPackagesBuild,
|
2016-04-08 22:33:32 +00:00
|
|
|
|
"--output", Dirs.TestPackages
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(versionSuffix))
|
|
|
|
|
{
|
|
|
|
|
dotnetPackArgs.Add("--version-suffix");
|
|
|
|
|
dotnetPackArgs.Add(versionSuffix);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dotnet.Pack(dotnetPackArgs.ToArray())
|
2016-02-02 18:04:50 +00:00
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
|
|
|
|
}
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-02-17 07:36:50 +00:00
|
|
|
|
return c.Success();
|
2016-02-16 19:26:40 +00:00
|
|
|
|
}
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
[Target]
|
|
|
|
|
public static BuildTargetResult CleanProductPackages(BuildTargetContext c)
|
|
|
|
|
{
|
|
|
|
|
foreach (var packageName in PackageTargets.ProjectsToPack)
|
|
|
|
|
{
|
|
|
|
|
Rmdir(Path.Combine(Dirs.NuGetPackages, packageName));
|
2016-04-08 22:33:32 +00:00
|
|
|
|
}
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
|
|
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-18 02:18:59 +00:00
|
|
|
|
[Target]
|
|
|
|
|
public static BuildTargetResult CleanTestPackages(BuildTargetContext c)
|
|
|
|
|
{
|
2016-04-20 23:50:11 +00:00
|
|
|
|
foreach (var packageProject in TestPackageProjects.Projects.Where(p => p.IsApplicable && p.Clean))
|
2016-03-27 00:16:39 +00:00
|
|
|
|
{
|
|
|
|
|
Rmdir(Path.Combine(Dirs.NuGetPackages, packageProject.Name));
|
2016-04-21 20:41:22 +00:00
|
|
|
|
if (packageProject.IsTool)
|
2016-03-27 00:16:39 +00:00
|
|
|
|
{
|
|
|
|
|
Rmdir(Path.Combine(Dirs.NuGetPackages, ".tools", packageProject.Name));
|
|
|
|
|
}
|
2016-04-08 22:33:32 +00:00
|
|
|
|
}
|
2016-02-18 02:18:59 +00:00
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
2016-02-17 07:36:50 +00:00
|
|
|
|
[Target]
|
|
|
|
|
public static BuildTargetResult BuildTestAssetProjects(BuildTargetContext c)
|
2016-02-16 19:26:40 +00:00
|
|
|
|
{
|
2016-04-19 00:46:27 +00:00
|
|
|
|
var testAssetsRoot = Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects");
|
2016-02-16 19:26:40 +00:00
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
2016-04-19 00:46:27 +00:00
|
|
|
|
var framework = "netcoreapp1.0";
|
2016-02-16 19:26:40 +00:00
|
|
|
|
|
2016-04-19 00:46:27 +00:00
|
|
|
|
return BuildTestAssets(c, testAssetsRoot, dotnet, framework);
|
|
|
|
|
}
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-04-19 00:46:27 +00:00
|
|
|
|
[Target]
|
|
|
|
|
[BuildPlatforms(BuildPlatform.Windows)]
|
|
|
|
|
public static BuildTargetResult BuildDesktopTestAssetProjects(BuildTargetContext c)
|
|
|
|
|
{
|
|
|
|
|
var testAssetsRoot = Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "DesktopTestProjects");
|
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
|
|
|
|
var framework = "net451";
|
|
|
|
|
|
|
|
|
|
return BuildTestAssets(c, testAssetsRoot, dotnet, framework);
|
2016-02-02 18:04:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
|
public static BuildTargetResult RestoreTests(BuildTargetContext c)
|
|
|
|
|
{
|
|
|
|
|
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "src"));
|
|
|
|
|
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "test"));
|
|
|
|
|
|
|
|
|
|
CleanNuGetTempCache();
|
2016-04-07 00:45:38 +00:00
|
|
|
|
DotNetCli.Stage2.Restore("--verbosity", "verbose",
|
2016-05-16 22:30:53 +00:00
|
|
|
|
"--fallbacksource", Dirs.TestPackages)
|
2016-02-02 18:04:50 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "test"))
|
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
|
public static BuildTargetResult BuildTests(BuildTargetContext c)
|
|
|
|
|
{
|
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
2016-02-06 02:55:15 +00:00
|
|
|
|
|
|
|
|
|
var configuration = c.BuildContext.Get<string>("Configuration");
|
|
|
|
|
|
2016-04-21 20:41:22 +00:00
|
|
|
|
foreach (var testProject in GetTestProjects())
|
2016-02-02 18:04:50 +00:00
|
|
|
|
{
|
2016-02-15 17:42:17 +00:00
|
|
|
|
c.Info($"Building tests: {testProject}");
|
2016-02-06 02:55:15 +00:00
|
|
|
|
dotnet.Build("--configuration", configuration)
|
2016-02-02 18:04:50 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "test", testProject))
|
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
|
|
|
|
}
|
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-17 06:28:37 +00:00
|
|
|
|
[Target(nameof(RunXUnitTests))]
|
2016-02-02 18:04:50 +00:00
|
|
|
|
public static BuildTargetResult RunTests(BuildTargetContext c) => c.Success();
|
|
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
|
public static BuildTargetResult RunXUnitTests(BuildTargetContext c)
|
|
|
|
|
{
|
|
|
|
|
// Need to load up the VS Vars
|
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
2016-02-16 04:20:53 +00:00
|
|
|
|
var vsvars = LoadVsVars(c);
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
2016-02-06 02:55:15 +00:00
|
|
|
|
var configuration = c.BuildContext.Get<string>("Configuration");
|
|
|
|
|
|
2016-02-02 18:04:50 +00:00
|
|
|
|
// Copy the test projects
|
|
|
|
|
var testProjectsDir = Path.Combine(Dirs.TestOutput, "TestProjects");
|
|
|
|
|
Rmdir(testProjectsDir);
|
|
|
|
|
Mkdirp(testProjectsDir);
|
|
|
|
|
CopyRecursive(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects"), testProjectsDir);
|
|
|
|
|
|
|
|
|
|
// Run the tests and set the VS vars in the environment when running them
|
|
|
|
|
var failingTests = new List<string>();
|
2016-04-21 20:41:22 +00:00
|
|
|
|
foreach (var project in GetTestProjects())
|
2016-02-02 18:04:50 +00:00
|
|
|
|
{
|
2016-02-18 05:20:18 +00:00
|
|
|
|
c.Info($"Running tests in: {project}");
|
2016-02-06 02:55:15 +00:00
|
|
|
|
var result = dotnet.Test("--configuration", configuration, "-xml", $"{project}-testResults.xml", "-notrait", "category=failing")
|
2016-02-02 18:04:50 +00:00
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "test", project))
|
|
|
|
|
.Environment(vsvars)
|
|
|
|
|
.EnvironmentVariable("PATH", $"{DotNetCli.Stage2.BinPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}")
|
2016-02-18 19:35:01 +00:00
|
|
|
|
.EnvironmentVariable("TEST_ARTIFACTS", Dirs.TestArtifacts)
|
2016-02-02 18:04:50 +00:00
|
|
|
|
.Execute();
|
|
|
|
|
if (result.ExitCode != 0)
|
|
|
|
|
{
|
|
|
|
|
failingTests.Add(project);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (failingTests.Any())
|
|
|
|
|
{
|
|
|
|
|
foreach (var project in failingTests)
|
|
|
|
|
{
|
|
|
|
|
c.Error($"{project} failed");
|
|
|
|
|
}
|
|
|
|
|
return c.Failed("Tests failed!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
|
public static BuildTargetResult ValidateDependencies(BuildTargetContext c)
|
|
|
|
|
{
|
2016-02-15 18:07:39 +00:00
|
|
|
|
var configuration = c.BuildContext.Get<string>("Configuration");
|
2016-02-02 18:04:50 +00:00
|
|
|
|
var dotnet = DotNetCli.Stage2;
|
|
|
|
|
|
|
|
|
|
c.Info("Publishing MultiProjectValidator");
|
|
|
|
|
dotnet.Publish("--output", Path.Combine(Dirs.Output, "tools"), "--configuration", configuration)
|
|
|
|
|
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "tools", "MultiProjectValidator"))
|
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
|
|
|
|
|
|
|
|
|
var validator = Path.Combine(Dirs.Output, "tools", $"pjvalidate{Constants.ExeSuffix}");
|
|
|
|
|
|
|
|
|
|
Cmd(validator, Path.Combine(c.BuildContext.BuildDirectory, "src"))
|
|
|
|
|
.Execute();
|
|
|
|
|
|
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
2016-04-21 20:41:22 +00:00
|
|
|
|
private static IEnumerable<string> GetTestProjects()
|
|
|
|
|
{
|
|
|
|
|
List<string> testProjects = new List<string>();
|
2016-04-22 00:29:19 +00:00
|
|
|
|
testProjects.AddRange(TestProjects);
|
2016-04-21 20:41:22 +00:00
|
|
|
|
|
|
|
|
|
if (CurrentPlatform.IsWindows)
|
|
|
|
|
{
|
|
|
|
|
testProjects.AddRange(WindowsTestProjects);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return testProjects;
|
|
|
|
|
}
|
|
|
|
|
|
2016-04-19 00:46:27 +00:00
|
|
|
|
private static BuildTargetResult BuildTestAssets(BuildTargetContext c, string testAssetsRoot, DotNetCli dotnet, string framework)
|
|
|
|
|
{
|
|
|
|
|
CleanBinObj(c, testAssetsRoot);
|
|
|
|
|
|
|
|
|
|
var nobuildFileName = ".noautobuild";
|
|
|
|
|
|
|
|
|
|
var projects = Directory.GetFiles(testAssetsRoot, "project.json", SearchOption.AllDirectories)
|
|
|
|
|
.Where(p => !ConditionalTestAssets.Where(s => !s.Skip() && p.EndsWith(Path.Combine(s.Path, "project.json"))).Any())
|
|
|
|
|
.Where(p => !File.Exists(Path.Combine(Path.GetDirectoryName(p), nobuildFileName)));
|
|
|
|
|
|
|
|
|
|
foreach (var project in projects)
|
|
|
|
|
{
|
|
|
|
|
c.Info($"Building: {project}");
|
|
|
|
|
dotnet.Build("--framework", framework)
|
|
|
|
|
.WorkingDirectory(Path.GetDirectoryName(project))
|
|
|
|
|
.Execute()
|
|
|
|
|
.EnsureSuccessful();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return c.Success();
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-16 04:20:53 +00:00
|
|
|
|
private static Dictionary<string, string> LoadVsVars(BuildTargetContext c)
|
2016-02-02 18:04:50 +00:00
|
|
|
|
{
|
|
|
|
|
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
|
|
|
{
|
|
|
|
|
return new Dictionary<string, string>();
|
|
|
|
|
}
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-02-16 07:43:51 +00:00
|
|
|
|
c.Verbose("Start Collecting Visual Studio Environment Variables");
|
2016-02-02 18:04:50 +00:00
|
|
|
|
|
|
|
|
|
var vsvarsPath = Path.GetFullPath(Path.Combine(Environment.GetEnvironmentVariable("VS140COMNTOOLS"), "..", "..", "VC"));
|
|
|
|
|
|
|
|
|
|
// Write a temp batch file because that seems to be the easiest way to do this (argument parsing is hard)
|
|
|
|
|
var temp = Path.Combine(Path.GetTempPath(), $"{Path.GetRandomFileName()}.cmd");
|
|
|
|
|
File.WriteAllText(temp, $@"@echo off
|
|
|
|
|
cd {vsvarsPath}
|
|
|
|
|
call vcvarsall.bat x64
|
|
|
|
|
set");
|
|
|
|
|
|
|
|
|
|
CommandResult result;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
result = Cmd(Environment.GetEnvironmentVariable("COMSPEC"), "/c", temp)
|
|
|
|
|
.WorkingDirectory(vsvarsPath)
|
|
|
|
|
.CaptureStdOut()
|
|
|
|
|
.Execute();
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
if (File.Exists(temp))
|
|
|
|
|
{
|
|
|
|
|
File.Delete(temp);
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-02-02 18:04:50 +00:00
|
|
|
|
result.EnsureSuccessful();
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-02-02 18:04:50 +00:00
|
|
|
|
var vars = new Dictionary<string, string>();
|
|
|
|
|
foreach (var line in result.StdOut.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
|
|
|
|
|
{
|
|
|
|
|
var splat = line.Split(new[] { '=' }, 2);
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-02-16 07:43:51 +00:00
|
|
|
|
if (splat.Length == 2)
|
|
|
|
|
{
|
|
|
|
|
c.Verbose($"Adding variable '{line}'");
|
|
|
|
|
vars[splat[0]] = splat[1];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
c.Info($"Skipping VS Env Variable. Unknown format: '{line}'");
|
|
|
|
|
}
|
2016-02-02 18:04:50 +00:00
|
|
|
|
}
|
2016-03-09 19:36:16 +00:00
|
|
|
|
|
2016-02-16 07:43:51 +00:00
|
|
|
|
c.Verbose("Finish Collecting Visual Studio Environment Variables");
|
2016-02-02 18:04:50 +00:00
|
|
|
|
return vars;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|