Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Runtime.CompilerServices;

namespace TestRunningMono
{
class Program
{
public static int Main(string[] args)
{
const int Pass = 100, Fail = 1;
bool isMono = typeof(object).Assembly.GetType("Mono.RuntimeStructs") != null;

bool isInterpreter = RuntimeFeature.IsDynamicCodeSupported == true && RuntimeFeature.IsDynamicCodeCompiled == false;

if(isMono && isInterpreter)
{
return Pass;
}
else
{
return Fail;
}
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<Optimize>false</Optimize>
<CLRTestPriority>0</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="runningmonointerpreter.cs" />
</ItemGroup>
</Project>

6 changes: 6 additions & 0 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3147,4 +3147,10 @@
<Issue>https://github.com/dotnet/runtime/issues/52781</Issue>
</ExcludeList>
</ItemGroup>

<ItemGroup Condition=" '$(RuntimeVariant)' != 'monointerpreter' " >
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/baseservices/mono/runningmonointerpreter/**">
<Issue>This test tests that we are running the mono interpreter, and so is excluded in all other cases.</Issue>
</ExcludeList>
</ItemGroup>
</Project>