summaryrefslogtreecommitdiff
path: root/tests/src/dir.targets
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2015-06-09 12:40:18 -0700
committerPat Gavlin <pagavlin@microsoft.com>2015-06-09 12:50:25 -0700
commitb5e2c0ff6765411cbea1cfcdce8c40b442727fe0 (patch)
tree69a22ec522af607753200710ef3648bc1fa2f634 /tests/src/dir.targets
parent11cacdc45583ae60bf5a3e69cd0f86b03020423c (diff)
downloadcoreclr-b5e2c0ff6765411cbea1cfcdce8c40b442727fe0.tar.gz
coreclr-b5e2c0ff6765411cbea1cfcdce8c40b442727fe0.tar.bz2
coreclr-b5e2c0ff6765411cbea1cfcdce8c40b442727fe0.zip
Add support for IL tests.
This change is comprised of two parts: - A new property in dir.targets, ProjectLanguage, that allows test projects to specify the language in which they are written. If unset, this property is inferred from the extension, defaulting to C# if all else fails. The only lanugages currently supported are C# and IL, but it should be easy to support others (e.g. Visual Basic) if necessary. - A copy of IL.targets from Microsoft.DotNet.BuildTools. This should be removed once CoreCLR has been moved to a version of the build tools package that contains IL.targets; this work is tracked by https://github.com/dotnet/coreclr/issues/1122. This work is necessary to support a large number of JIT tests that are written in IL and have yet to be ported.
Diffstat (limited to 'tests/src/dir.targets')
-rw-r--r--tests/src/dir.targets11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/src/dir.targets b/tests/src/dir.targets
index 0c38331b7d..8335ec4262 100644
--- a/tests/src/dir.targets
+++ b/tests/src/dir.targets
@@ -40,7 +40,16 @@
</ItemGroup>
</Target>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+ <!-- Project language -->
+ <PropertyGroup Condition="'$(ProjectLanguage)' == ''">
+ <ProjectLanguage Condition="'$(MSBuildProjectExtension)' == '.ilproj' OR '$(Language)' == 'IL'">IL</ProjectLanguage>
+ <ProjectLanguage Condition="'$(MSBuildProjectExtension)' == '.csproj' OR '$(Language)' == 'C#' OR '$(ProjectLanguage)'==''">CSharp</ProjectLanguage>
+ </PropertyGroup>
+
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" Condition="'$(ProjectLanguage)' == 'CSharp'" />
+
+ <!-- TODO (#1122): import this from the ToolsDir once it becomes available -->
+ <Import Project="$(ProjectDir)IL.targets" Condition="'$(ProjectLanguage)' == 'IL'" />
<Import Project="$(ToolsDir)packageresolve.targets" Condition="Exists('$(ToolsDir)packageresolve.targets')" />