Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClrOnly condition is not working on mono #75548

Merged
merged 23 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bb45c8c
Remove LittleEndian asserts
giritrivedi Sep 18, 2024
534273d
Skip tests on mono
giritrivedi Sep 18, 2024
93e392d
Revert "Skip tests on mono"
giritrivedi Sep 18, 2024
f89e29d
Skip tests on mono
giritrivedi Sep 18, 2024
fc5d7c9
Take care of review comments
giritrivedi Oct 3, 2024
db3a057
Merge branch 'main' into SkipMonoTests
giritrivedi Oct 6, 2024
e12a58d
Update EditAndContinueStateMachineTests.vb
giritrivedi Oct 7, 2024
6ca6f6c
Fix formatting in EditAndContinueClosureTests.vb
giritrivedi Oct 9, 2024
643d47c
Update EditAndContinueClosureTests.vb
giritrivedi Oct 9, 2024
441bfc0
Fix formatting in EditAndContinueClouseTests.vb
giritrivedi Oct 9, 2024
35b537b
Addressing reviewing comments
giritrivedi Oct 17, 2024
e4e3c98
ClrOnly condition is not working on mono
giritrivedi Oct 17, 2024
38526f4
Fix indentation
giritrivedi Oct 17, 2024
087f614
Update src/Compilers/Test/Core/Assert/ConditionalFactAttribute.cs
giritrivedi Oct 18, 2024
e66a159
Add comments to describe IsMonoCore and IsMonoDesktop
giritrivedi Oct 18, 2024
173d756
Update ConditionalFactAttribute.cs
giritrivedi Oct 18, 2024
aa14432
Update ConditionalFactAttribute.cs
giritrivedi Oct 18, 2024
3c8266c
Update ConditionalFactAttribute.cs
giritrivedi Oct 18, 2024
7d2f13c
ClrOnly condition is not working on mono
giritrivedi Oct 17, 2024
777b711
Define IsAnyMono property and NotOnAnyMono Attribute
giritrivedi Oct 22, 2024
a0ccc7f
Define IsAnyMono property and NotOnAnyMono Attribute
giritrivedi Oct 22, 2024
c3feb89
Merge branch 'main' into clrOnlyConditionNotWorking
giritrivedi Oct 22, 2024
8a8729d
Update src/Compilers/Test/Core/Assert/ConditionalFactAttribute.cs
giritrivedi Oct 22, 2024
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
Expand Up @@ -373,7 +373,7 @@ static ImmutableArray<INamedTypeSymbol> getForwardedTypes(AssemblySymbol assembl
}
}

[ConditionalFact(typeof(ClrOnly), Reason = "Static execution is runtime defined and this tests Clr behavior only")]
[ConditionalFact(typeof(NotOnAnyMono), Reason = "Static execution is runtime defined and this tests Clr behavior only")]
public void TestPartialPartsDeterministic()
{
var x1 =
Expand Down
7 changes: 7 additions & 0 deletions src/Compilers/Test/Core/Assert/ConditionalFactAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public static class ExecutionConditionUtil
public static bool IsMono => MonoHelpers.IsRunningOnMono();
// IsMonoCore means https://github.com/dotnet/runtime/tree/main/src/mono
public static bool IsMonoCore => Type.GetType("Mono.RuntimeStructs") != null;
public static bool IsAnyMono => IsMonoCore || IsMonoDesktop;
public static bool IsCoreClr => !IsDesktop;
public static bool IsCoreClrUnix => IsCoreClr && IsUnix;
public static bool IsMonoOrCoreClr => IsMono || IsCoreClr;
Expand Down Expand Up @@ -341,6 +342,12 @@ public class NotOnMonoCore : ExecutionCondition
public override string SkipReason => "Test not supported on Mono Core";
}

public class NotOnAnyMono : ExecutionCondition
{
public override bool ShouldSkip => ExecutionConditionUtil.IsAnyMono;
public override string SkipReason => "Test not supported on Mono core or Mono Desktop";
}

public class CoreClrOnly : ExecutionCondition
{
public override bool ShouldSkip => !ExecutionConditionUtil.IsCoreClr;
Expand Down