Merge pull request #722 from Sridhar-MS/centos-tests

Enable running tests for CentOS
This commit is contained in:
Piotr Puszkiewicz 2016-01-06 01:14:04 -08:00
commit 6b1e11a1c9
31 changed files with 64 additions and 43 deletions

View file

@ -37,15 +37,9 @@ fi
header "Compiling" header "Compiling"
$REPOROOT/scripts/compile/compile.sh $REPOROOT/scripts/compile/compile.sh
# Skipping tests for centos # Run tests on the stage2 output
# tracked by issue - https://github.com/dotnet/corefx/issues/5066 header "Testing stage2..."
if [ "$OSNAME" != "centos" ]; then DOTNET_HOME=$STAGE2_DIR DOTNET_TOOLS=$STAGE2_DIR $REPOROOT/scripts/test/runtests.sh
# Run tests on the stage2 output
header "Testing stage2..."
DOTNET_HOME=$STAGE2_DIR DOTNET_TOOLS=$STAGE2_DIR $REPOROOT/scripts/test/runtests.sh
else
header "Skipping tests on CentOS due to corefx issue 5066"
fi
header "Validating Dependencies" header "Validating Dependencies"
$REPOROOT/scripts/test/validate-dependencies.sh $REPOROOT/scripts/test/validate-dependencies.sh

View file

@ -9,7 +9,7 @@ set BIN_DIR=%CD%\bin
popd popd
REM Replace with a robust method for finding the right crossgen.exe REM Replace with a robust method for finding the right crossgen.exe
set CROSSGEN_UTIL=%UserProfile%\.dnx\packages\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23616\tools\crossgen.exe set CROSSGEN_UTIL=%UserProfile%\.dnx\packages\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23704\tools\crossgen.exe
REM Crossgen currently requires itself to be next to mscorlib REM Crossgen currently requires itself to be next to mscorlib
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul

View file

@ -22,7 +22,7 @@ if [ -z "$RID" ]; then
fi fi
# Replace with a robust method for finding the right crossgen.exe # Replace with a robust method for finding the right crossgen.exe
CROSSGEN_UTIL=$HOME/.dnx/packages/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23616/tools/crossgen CROSSGEN_UTIL=$HOME/.dnx/packages/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23704/tools/crossgen
cd $BIN_DIR cd $BIN_DIR

View file

@ -17,7 +17,7 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source "$DIR/../common/_common.sh" source "$DIR/../common/_common.sh"
# Run Validation for Project.json dependencies # Run Validation for Project.json dependencies
dotnet publish "$REPOROOT/tools/MultiProjectValidator" -o "$STAGE2_DIR/../tools" dotnet publish "$REPOROOT/tools/MultiProjectValidator" -r "$RID" -o "$STAGE2_DIR/../tools"
#TODO for release builds this should fail #TODO for release builds this should fail
set +e set +e
"$STAGE2_DIR/../tools/pjvalidate" "$REPOROOT/src" "$STAGE2_DIR/../tools/pjvalidate" "$REPOROOT/src"

View file

@ -2,7 +2,7 @@
"version": "1.0.0-*", "version": "1.0.0-*",
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.ProjectModel": "1.0.0", "Microsoft.DotNet.ProjectModel": "1.0.0",
"System.Reflection.Metadata": "1.1.0" "System.Reflection.Metadata": "1.1.0"
}, },

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.Cli.Utils": "1.0.0-*", "Microsoft.DotNet.Cli.Utils": "1.0.0-*",
"Microsoft.Extensions.CommandLineUtils.Sources": { "Microsoft.Extensions.CommandLineUtils.Sources": {

View file

@ -7,7 +7,7 @@
"dependencies": { "dependencies": {
"System.Reflection": "4.0.10-rc2-23616", "System.Reflection": "4.0.10-rc2-23616",
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"System.CommandLine": "0.1.0-*", "System.CommandLine": "0.1.0-*",
"Microsoft.CodeAnalysis.CSharp": "1.1.1", "Microsoft.CodeAnalysis.CSharp": "1.1.1",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",

View file

@ -4,11 +4,11 @@
"keyFile": "../../tools/Key.snk" "keyFile": "../../tools/Key.snk"
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"System.Runtime.Loader": "4.0.0-rc2-23616" "System.Runtime.Loader": "4.0.0-rc2-23616"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }
} }
} }

View file

@ -4,11 +4,11 @@
"keyFile": "../../tools/Key.snk" "keyFile": "../../tools/Key.snk"
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.CodeAnalysis.CSharp.Workspaces": "1.1.0-*" "Microsoft.CodeAnalysis.CSharp.Workspaces": "1.1.0-*"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }
} }
} }

View file

@ -22,7 +22,7 @@ namespace Microsoft.DotNet.ProjectModel
{ {
if(IsCentOS()) if(IsCentOS())
{ {
return "centos.7.1-x64"; return "centos.7-x64";
} }
else if(IsUbuntu()) else if(IsUbuntu())
{ {

View file

@ -5,7 +5,7 @@
}, },
"description": "Types to model a .NET Project", "description": "Types to model a .NET Project",
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"System.Threading.Thread": "4.0.0-rc2-23616", "System.Threading.Thread": "4.0.0-rc2-23616",
"System.Runtime.Loader": "4.0.0-rc2-23616", "System.Runtime.Loader": "4.0.0-rc2-23616",
"System.Dynamic.Runtime": "4.0.11-rc2-23616", "System.Dynamic.Runtime": "4.0.11-rc2-23616",

View file

@ -5,7 +5,7 @@
}, },
"dependencies": { "dependencies": {
"NETStandard.Library" : "1.0.0-rc2-23616" "NETStandard.Library" : "1.0.0-rc2-23704"
}, },
"frameworks": { "frameworks": {

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23608", "NETStandard.Library": "1.0.0-rc2-23704",
"System.Linq": "4.0.1-rc2-23608", "System.Linq": "4.0.1-rc2-23608",
"System.Reflection.Metadata": "1.1.0", "System.Reflection.Metadata": "1.1.0",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.Net.Compilers.netcore": "1.2.0-beta1-20151228-02", "Microsoft.Net.Compilers.netcore": "1.2.0-beta1-20151228-02",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.FSharp.Compiler.netcore": "1.0.0-alpha-151218", "Microsoft.FSharp.Compiler.netcore": "1.0.0-alpha-151218",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.Cli.Utils": "1.0.0-*", "Microsoft.DotNet.Cli.Utils": "1.0.0-*",
"Microsoft.Extensions.CommandLineUtils.Sources": { "Microsoft.Extensions.CommandLineUtils.Sources": {

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"System.Reflection.Metadata": "1.1.0", "System.Reflection.Metadata": "1.1.0",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Compiler.Common": "1.0.0-*", "Microsoft.DotNet.Compiler.Common": "1.0.0-*",

View file

@ -5,7 +5,7 @@
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616" "NETStandard.Library": "1.0.0-rc2-23704"
}, },
"frameworks": { "frameworks": {

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": "1.0.0-*", "Microsoft.DotNet.Cli.Utils": "1.0.0-*",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"System.IO.Compression.ZipFile": "4.0.1-rc2-23616", "System.IO.Compression.ZipFile": "4.0.1-rc2-23616",
"Microsoft.DotNet.Compiler.Common": "1.0.0-*", "Microsoft.DotNet.Compiler.Common": "1.0.0-*",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": "1.0.0-*", "Microsoft.DotNet.Cli.Utils": "1.0.0-*",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.Net.CSharp.Interactive.netcore": "1.2.0-beta1-20151228-02", "Microsoft.Net.CSharp.Interactive.netcore": "1.2.0-beta1-20151228-02",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": "1.0.0-*", "Microsoft.DotNet.Cli.Utils": "1.0.0-*",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"System.Xml.XDocument": "4.0.11-rc2-23616", "System.Xml.XDocument": "4.0.11-rc2-23616",
"System.Resources.ReaderWriter": "4.0.0-rc2-23616", "System.Resources.ReaderWriter": "4.0.0-rc2-23616",

View file

@ -5,7 +5,7 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.Net.Compilers.netcore": "1.2.0-beta1-20151228-02", "Microsoft.Net.Compilers.netcore": "1.2.0-beta1-20151228-02",
"System.CommandLine" : "0.1.0-d111815-3", "System.CommandLine" : "0.1.0-d111815-3",

View file

@ -37,7 +37,7 @@
"frameworks": { "frameworks": {
"dnxcore50": { "dnxcore50": {
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"System.Diagnostics.TextWriterTraceListener": "4.0.0-rc2-23616", "System.Diagnostics.TextWriterTraceListener": "4.0.0-rc2-23616",
"System.Diagnostics.TraceSource": "4.0.0-rc2-23616", "System.Diagnostics.TraceSource": "4.0.0-rc2-23616",
"System.Dynamic.Runtime": "4.0.11-rc2-23616", "System.Dynamic.Runtime": "4.0.11-rc2-23616",
@ -51,4 +51,4 @@
"../../scripts/build/place-binary \"%compile:OutputDir%/%project:Name%.pdb\"" "../../scripts/build/place-binary \"%compile:OutputDir%/%project:Name%.pdb\""
] ]
} }
} }

View file

@ -19,7 +19,7 @@
"frameworks": { "frameworks": {
"dnxcore50": { "dnxcore50": {
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23616", "NETStandard.Library": "1.0.0-rc2-23704",
"System.Resources.ResourceManager": "4.0.1-rc2-23616" "System.Resources.ResourceManager": "4.0.1-rc2-23616"
} }
} }
@ -30,4 +30,4 @@
"../../scripts/build/place-binary \"%compile:OutputDir%/%project:Name%.pdb\"" "../../scripts/build/place-binary \"%compile:OutputDir%/%project:Name%.pdb\""
] ]
} }
} }

View file

@ -50,6 +50,12 @@ namespace Microsoft.DotNet.Tests.EndToEnd
[ActiveIssue(712, PlatformID.Windows | PlatformID.OSX | PlatformID.Linux)] [ActiveIssue(712, PlatformID.Windows | PlatformID.OSX | PlatformID.Linux)]
public void TestDotnetBuildNativeRyuJit() public void TestDotnetBuildNativeRyuJit()
{ {
if(IsCentOS())
{
Console.WriteLine("Skipping native compilation tests on CentOS - https://github.com/dotnet/cli/issues/453");
return;
}
var buildCommand = new BuildCommand(TestProject, output: OutputDirectory, native: true); var buildCommand = new BuildCommand(TestProject, output: OutputDirectory, native: true);
buildCommand.Execute().Should().Pass(); buildCommand.Execute().Should().Pass();
@ -61,6 +67,12 @@ namespace Microsoft.DotNet.Tests.EndToEnd
[Fact] [Fact]
public void TestDotnetBuildNativeCpp() public void TestDotnetBuildNativeCpp()
{ {
if(IsCentOS())
{
Console.WriteLine("Skipping native compilation tests on CentOS - https://github.com/dotnet/cli/issues/453");
return;
}
var buildCommand = new BuildCommand(TestProject, output: OutputDirectory, native: true, nativeCppMode: true); var buildCommand = new BuildCommand(TestProject, output: OutputDirectory, native: true, nativeCppMode: true);
buildCommand.Execute().Should().Pass(); buildCommand.Execute().Should().Pass();
@ -132,6 +144,21 @@ namespace Microsoft.DotNet.Tests.EndToEnd
result.Should().NotHaveStdErr(); result.Should().NotHaveStdErr();
result.Should().Pass(); result.Should().Pass();
} }
private bool IsCentOS()
{
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
const string OSIDFILE = "/etc/os-release";
if(File.Exists(OSIDFILE))
{
return File.ReadAllText(OSIDFILE).ToLower().Contains("centos");
}
}
return false;
}
} }
} }

View file

@ -5,7 +5,7 @@
}, },
"dependencies": { "dependencies": {
"NETStandard.Library" : "1.0.0-rc2-23616", "NETStandard.Library" : "1.0.0-rc2-23704",
"xunit": "2.1.0", "xunit": "2.1.0",
"xunit.console.netcore": "1.0.2-prerelease-00101", "xunit.console.netcore": "1.0.2-prerelease-00101",

View file

@ -2,7 +2,7 @@
"version": "1.0.0-*", "version": "1.0.0-*",
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23614", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.NETCore.TestHost" : "1.0.0-*", "Microsoft.NETCore.TestHost" : "1.0.0-*",
"xunit": "2.1.0", "xunit": "2.1.0",
@ -17,4 +17,4 @@
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }
} }
} }

View file

@ -6,7 +6,7 @@
}, },
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-rc2-23614", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.DotNet.ProjectModel": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": "1.0.0-*" "Microsoft.DotNet.Cli.Utils": "1.0.0-*"
}, },