- With 3.1.102 I need to list pipelines explicitly
- Copy test assets to a temp directory (arcade needs it)
- Use .dll on *nix instead of the executable. I'm not seeing the
  the executable created on macos. Older versions of tye successful
  use the .dll.
This commit is contained in:
Ryan Nowak 2020-03-05 15:59:21 -08:00 коммит произвёл Ryan Nowak
Родитель b8bdbbc62f
Коммит 23e725ee02
4 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -280,7 +280,7 @@ namespace Tye.Hosting
{
// TODO: Use msbuild to get the target path
var outputFileName = Path.GetFileNameWithoutExtension(projectFilePath) + (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : "");
var outputFileName = Path.GetFileNameWithoutExtension(projectFilePath) + (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : ".dll");
var debugOutputPath = Path.Combine(Path.GetDirectoryName(projectFilePath)!, "bin", "Debug");

Просмотреть файл

@ -25,6 +25,7 @@
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Sln" Version="0.3.0" />
<PackageReference Include="System.IO.Pipelines" Version="4.7.0" />
<PackageReference Include="YamlDotNet" Version="8.0.0" />
<PackageReference Include="System.Reactive" Version="4.3.2" />
</ItemGroup>

Просмотреть файл

@ -6,6 +6,10 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\src\tye\TempDirectory.cs" Link="TempDirectory.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="xunit" Version="2.4.0" />

Просмотреть файл

@ -8,6 +8,7 @@ using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Tye;
using Tye.ConfigModel;
using Tye.Hosting;
using Xunit;
@ -19,8 +20,14 @@ namespace E2ETest
[Fact]
public async Task SingleProjectTest()
{
var application = ConfigFactory.FromFile(new FileInfo(Path.Combine(GetSolutionRootDirectory("tye"), "samples", "single-project", "test-project", "test-project.csproj")));
var host = new TyeHost(application.ToHostingApplication(), new string[0]);
var projectDirectory = new DirectoryInfo(Path.Combine(GetSolutionRootDirectory("tye"), "samples", "single-project", "test-project"));
using var tempDirectory = TempDirectory.Create();
DirectoryCopy.Copy(projectDirectory.FullName, tempDirectory.DirectoryPath);
var projectFile = new FileInfo(Path.Combine(tempDirectory.DirectoryPath, "test-project.csproj"));
var application = ConfigFactory.FromFile(projectFile);
var host = new TyeHost(application.ToHostingApplication(), Array.Empty<string>());
await host.StartAsync();
try
{