Skip to content

Commit

Permalink
Revert "fix ubuntu_16_04"
Browse files Browse the repository at this point in the history
This reverts commit 6e36bce.
  • Loading branch information
ramarag committed Mar 14, 2017
1 parent 988265f commit fcfd71d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion TestAssets/TestProjects/SimpleCache/SimpleCache.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<ItemGroup>
<PackageReference Include="System.Private.Uri" Version="4.4.0-beta-24821-02" />
<PackageReference Include="Microsoft.NETCore.DotNetAppHost" Version="1.2.0-beta-001304-00" />
<PackageReference Include="Microsoft.NETCore.CoreDisTools" Version="1.0.1-prerelease-00001" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.DotNetAppHost" Version="1.2.0-beta-001304-00" />
<PackageReference Include="Microsoft.NETCore.CoreDisTools" Version="1.0.1-prerelease-00001" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Microsoft.NET.Publish.Tests
{
public class GivenThatWeWantToCacheAProjectWithDependencies : SdkTest
{
private static string _libPrefix;
private static string _runtimeOs;
private static string _runtimeLibOs;
private static string _runtimeRid;
Expand All @@ -32,19 +33,21 @@ static GivenThatWeWantToCacheAProjectWithDependencies()
var rid = RuntimeEnvironment.GetRuntimeIdentifier();
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
_libPrefix = "";
_runtimeOs = "win7";
_runtimeLibOs = "win";
_testArch = rid.Substring(rid.LastIndexOf("-") + 1);
_runtimeRid = "win7-" + _testArch;
}
else
{
_libPrefix = "lib";
_runtimeOs = "unix";
_runtimeLibOs = "unix";

if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// microsoft.netcore.dotnetapphost has assets only for osx.10.10
// microsoft.netcore.coredistools only has assets for osx.10.10
_runtimeRid = "osx.10.10-x64";
}
else
Expand Down Expand Up @@ -74,7 +77,8 @@ public void compose_dependencies()

List<string> files_on_disk = new List < string > {
"artifact.xml",
$"runtime.{_runtimeRid}.microsoft.netcore.dotnetapphost/1.2.0-beta-001304-00/runtimes/{_runtimeRid}/native/apphost{Constants.ExeSuffix}",
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/{_libPrefix}coredistools{Constants.DynamicLibSuffix}",
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/coredistools.h"
};

if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && _testArch != "x86")
Expand All @@ -89,10 +93,10 @@ public void compose_dependencies()

knownpackage.Add(new PackageIdentity("Microsoft.NETCore.Targets", NuGetVersion.Parse("1.2.0-beta-24821-02")));
knownpackage.Add(new PackageIdentity("System.Private.Uri", NuGetVersion.Parse("4.4.0-beta-24821-02")));
knownpackage.Add(new PackageIdentity("Microsoft.NETCore.DotNetAppHost", NuGetVersion.Parse("1.2.0-beta-001304-00")));
knownpackage.Add(new PackageIdentity("Microsoft.NETCore.CoreDisTools", NuGetVersion.Parse("1.0.1-prerelease-00001")));
knownpackage.Add(new PackageIdentity($"runtime.{_runtimeOs}.System.Private.Uri", NuGetVersion.Parse("4.4.0-beta-24821-02")));
knownpackage.Add(new PackageIdentity("Microsoft.NETCore.Platforms", NuGetVersion.Parse("1.2.0-beta-24821-02")));
knownpackage.Add(new PackageIdentity($"runtime.{_runtimeRid}.Microsoft.NETCore.DotNetAppHost", NuGetVersion.Parse("1.2.0-beta-001304-00")));
knownpackage.Add(new PackageIdentity($"runtime.{_runtimeRid}.Microsoft.NETCore.CoreDisTools", NuGetVersion.Parse("1.0.1-prerelease-00001")));

if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && _testArch != "x86")
{
Expand All @@ -111,7 +115,6 @@ public void compose_dependencies()
}

}

[Fact]
public void compose_with_fxfiles()
{
Expand All @@ -133,7 +136,8 @@ public void compose_with_fxfiles()
DirectoryInfo cacheDirectory = new DirectoryInfo(OutputFolder);
List<string> files_on_disk = new List<string> {
"artifact.xml",
$"runtime.{_runtimeRid}.microsoft.netcore.dotnetapphost/1.2.0-beta-001304-00/runtimes/{_runtimeRid}/native/apphost{Constants.ExeSuffix}",
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/{_libPrefix}coredistools{Constants.DynamicLibSuffix}",
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/coredistools.h",
$"runtime.{_runtimeOs}.system.private.uri/4.4.0-beta-24821-02/runtimes/{_runtimeLibOs}/lib/netstandard1.0/System.Private.Uri.dll"
};

Expand Down Expand Up @@ -167,7 +171,8 @@ public void compose_dependencies_noopt()

List<string> files_on_disk = new List<string> {
"artifact.xml",
$"runtime.{_runtimeRid}.microsoft.netcore.dotnetapphost/1.2.0-beta-001304-00/runtimes/{_runtimeRid}/native/apphost{Constants.ExeSuffix}",
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/{_libPrefix}coredistools{Constants.DynamicLibSuffix}",
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/coredistools.h",
$"runtime.{_runtimeOs}.system.private.uri/4.4.0-beta-24821-02/runtimes/{_runtimeLibOs}/lib/netstandard1.0/System.Private.Uri.dll"
};

Expand Down Expand Up @@ -200,7 +205,8 @@ public void cache_nativeonlyassets()

List<string> files_on_disk = new List<string> {
"artifact.xml",
$"runtime.{_runtimeRid}.microsoft.netcore.dotnetapphost/1.2.0-beta-001304-00/runtimes/{_runtimeRid}/native/apphost{Constants.ExeSuffix}"
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/{_libPrefix}coredistools{Constants.DynamicLibSuffix}",
$"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/coredistools.h"
};

cacheDirectory.Should().OnlyHaveFiles(files_on_disk);
Expand Down

0 comments on commit fcfd71d

Please sign in to comment.