summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Gavlin <pgavlin@gmail.com>2015-06-09 15:02:57 -0700
committerPat Gavlin <pgavlin@gmail.com>2015-06-09 15:02:57 -0700
commit8a182151cd31ac37a5ecf47eaee8184ec0636f1f (patch)
tree7d3a37fe6b09b150f20e0607ea26a6dd76823da1
parentec397f78139a1c882d3d7c088afd70399f30cc87 (diff)
parentb5e2c0ff6765411cbea1cfcdce8c40b442727fe0 (diff)
downloadcoreclr-8a182151cd31ac37a5ecf47eaee8184ec0636f1f.tar.gz
coreclr-8a182151cd31ac37a5ecf47eaee8184ec0636f1f.tar.bz2
coreclr-8a182151cd31ac37a5ecf47eaee8184ec0636f1f.zip
Merge pull request #1123 from pgavlin/ILTestSupport
Add support for IL tests.
-rw-r--r--tests/src/IL.targets28
-rw-r--r--tests/src/dir.targets11
2 files changed, 38 insertions, 1 deletions
diff --git a/tests/src/IL.targets b/tests/src/IL.targets
new file mode 100644
index 0000000000..0096377664
--- /dev/null
+++ b/tests/src/IL.targets
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <!-- Required by Microsoft.Common.targets -->
+ <Target Name="CreateManifestResourceNames" Condition="'@(EmbeddedResource)' != ''" />
+
+ <Target Name="CoreCompile"
+ Inputs="$(MSBuildAllProjects);
+ @(Compile)"
+ Outputs="@(IntermediateAssembly);"
+ Returns=""
+ DependsOnTargets="$(CoreCompileDependsOn)">
+ <PropertyGroup>
+ <_OutputTypeArgument Condition="'$(OutputType)' == 'Library'">/DLL</_OutputTypeArgument>
+ <_OutputTypeArgument Condition="'$(OutputType)' == 'Exe'">/EXE</_OutputTypeArgument>
+
+ <_KeyFileArgument Condition="'$(KeyOriginatorFile)' != ''">/KEY=$(KeyOriginatorFile)</_KeyFileArgument>
+ </PropertyGroup>
+
+ <Exec Command="ilasm /QUIET $(_OutputTypeArgument) /OUTPUT=@(IntermediateAssembly) $(_KeyFileArgument) @(Compile)">
+ <Output TaskParameter="ExitCode" PropertyName="_ILAsmExitCode" />
+ </Exec>
+ <Error Text="ILAsm failed" Condition="'$(_ILAsmExitCode)' != '0'" />
+ </Target>
+
+ <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
+
+</Project>
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')" />