summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorwtgodbe <wigodbe@microsoft.com>2017-01-17 14:47:51 -0800
committerwtgodbe <wigodbe@microsoft.com>2017-01-24 12:35:50 -0800
commiteb610f615bc4076ad950c98157e83bc34649064f (patch)
tree111869be6a4bba0ff85583c7fe2997fd9ddc37f2 /tests/src
parent6a3c584b80dde7752a595344b3dc727918c94183 (diff)
downloadcoreclr-eb610f615bc4076ad950c98157e83bc34649064f.tar.gz
coreclr-eb610f615bc4076ad950c98157e83bc34649064f.tar.bz2
coreclr-eb610f615bc4076ad950c98157e83bc34649064f.zip
Add support for running CoreCLR Tests in Helix
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs17
-rw-r--r--tests/src/dir.common.props2
-rw-r--r--tests/src/dir.props11
-rw-r--r--tests/src/dirs.proj6
4 files changed, 24 insertions, 12 deletions
diff --git a/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs b/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
index dbdfc0ef94..ddb905087b 100644
--- a/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
+++ b/tests/src/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
@@ -35,6 +35,10 @@ namespace CoreclrTestLib
string gcstressVar = Environment.GetEnvironmentVariable(GC_STRESS_LEVEL);
+ // Check if we are running in Windows
+ string operatingSystem = System.Environment.GetEnvironmentVariable("OS");
+ bool runningInWindows = (operatingSystem != null && operatingSystem.StartsWith("Windows"));
+
var outputStream = new FileStream(outputFile, FileMode.Create);
var errorStream = new FileStream(errorFile, FileMode.Create);
@@ -49,7 +53,18 @@ namespace CoreclrTestLib
process.StartInfo.EnvironmentVariables["COMPlus_GCStress"] = gcstressVar;
}
- process.StartInfo.FileName = executable;
+ // Windows can run the executable implicitly
+ if (runningInWindows)
+ {
+ process.StartInfo.FileName = executable;
+ }
+ // Non-windows needs to be told explicitly to run through /bin/bash shell
+ else
+ {
+ process.StartInfo.FileName = "/bin/bash";
+ process.StartInfo.Arguments = executable;
+ }
+
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
diff --git a/tests/src/dir.common.props b/tests/src/dir.common.props
index d5de5794d0..5a7ee2e83a 100644
--- a/tests/src/dir.common.props
+++ b/tests/src/dir.common.props
@@ -45,7 +45,7 @@
<__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\obj\$(BuildOS).$(Platform).$(Configuration)\Native\))</__NativeTestIntermediatesDir>
<BuildProjectRelativeDir>$(MSBuildProjectName)\</BuildProjectRelativeDir>
<BuildProjectRelativeDir Condition="'$(MSBuildProjectDirectory.Contains($(SourceDir)))'">$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace($(SourceDir),''))\$(MSBuildProjectName)</BuildProjectRelativeDir>
- <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(BuildProjectRelativeDir)</IntermediateOutputPath>
+ <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(BuildProjectRelativeDir)\</IntermediateOutputPath>
<OutputPath>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutputPath>
<TestWorkingDir Condition="'$(TestWorkingDir)'==''">$(BaseOutputPath)\testStagingDir\</TestWorkingDir>
<TestPath Condition="'$(TestPath)'==''">$(TestWorkingDir)$(OSPlatformConfig)\$(MSBuildProjectName)/</TestPath>
diff --git a/tests/src/dir.props b/tests/src/dir.props
index e8cdfd4036..2fb2e1942b 100644
--- a/tests/src/dir.props
+++ b/tests/src/dir.props
@@ -34,7 +34,6 @@
<PropertyGroup>
<TargetsWindows>true</TargetsWindows>
<TestNugetRuntimeId>win7-x64</TestNugetRuntimeId>
- <DefaultTestTFM>net45</DefaultTestTFM>
</PropertyGroup>
</When>
<When Condition="'$(OSGroup)'=='Linux'">
@@ -67,14 +66,8 @@
<PropertyGroup>
<TargetsUnknownUnix Condition="'$(TargetsUnix)' == 'true' AND '$(OSGroup)' != 'FreeBSD' AND '$(OSGroup)' != 'Linux' AND '$(OSGroup)' != 'OSX'">true</TargetsUnknownUnix>
- </PropertyGroup>
-
- <!-- Default Test platform to deploy the netstandard compiled tests to -->
- <PropertyGroup>
- <!-- we default TestTFM and FilterToTestTFM to netcoreapp1.0 if they are not explicity defined -->
- <DefaultTestTFM Condition="'$(DefaultTestTFM)'==''">netcoreapp1.0</DefaultTestTFM>
- <TestTFM Condition="'$(TestTFM)'==''">$(DefaultTestTFM)</TestTFM>
- <FilterToTestTFM Condition="'$(FilterToTestTFM)'==''">$(DefaultTestTFM)</FilterToTestTFM>
+ <Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.csproj'">C#</Language>
+ <Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.ilproj'">IL</Language>
</PropertyGroup>
<!-- Set default ZapRequire level (used only when CrossGen is enabled) -->
diff --git a/tests/src/dirs.proj b/tests/src/dirs.proj
index 99a50a4f6c..5314c27cfa 100644
--- a/tests/src/dirs.proj
+++ b/tests/src/dirs.proj
@@ -16,10 +16,14 @@
<ItemGroup>
<DisabledProjects Include="TestWrappers*\*\*.csproj" />
<DisabledProjects Include="*\**\cs_template.csproj" />
- <DisabledProjects Include="Common\Coreclr.TestWrapper\Coreclr.TestWrapper.csproj" />
+ <DisabledProjects Include="Common\Coreclr.TestWrapper\Coreclr.TestWrapper.csproj" Condition="'$(BuildTestsAgainstPackages)' != 'true'" />
+ <DisabledProjects Include="Common\Desktop.Coreclr.TestWrapper\Desktop.Coreclr.TestWrapper.csproj" Condition="'$(BuildTestsAgainstPackages)' == 'true'" />
<DisabledProjects Include="Common\test_runtime\test_runtime.csproj" />
<DisabledProjects Include="Common\test_dependencies\test_dependencies.csproj" />
+ <DisabledProjects Include="Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj" />
+ <DisabledProjects Include="Common\targeting_pack_ref\targeting_pack_ref.csproj" />
<DisabledProjects Include="GC\Performance\Framework\GCPerfTestFramework.csproj" />
+ <DisabledProjects Include="JIT\superpmi\superpmicollect.csproj" Condition="'$(BuildTestsAgainstPackages)' == 'true'" />
<DisabledProjects Include="Loader\classloader\generics\regressions\DD117522\Test.csproj" />
<DisabledProjects Include="Loader\classloader\generics\GenericMethods\VSW491668.csproj" /> <!-- issue 5501 -->
</ItemGroup>