<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<CLRTestKind>BuildOnly</CLRTestKind>
- <DefineConstants>$(DefineConstants);WINCORESYS;$([System.String]::Copy('$(BuildArch)').ToUpper())</DefineConstants>
+ <DefineConstants>$(DefineConstants);$([System.String]::Copy('$(BuildArch)').ToUpper())</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateRunScript>false</GenerateRunScript>
</PropertyGroup>
{
public static class TestFramework
{
+ private const int DEFAULT_SEED = 20010415;
+
public static void LogInformation(string str)
{
Logging.WriteLine(str);
public static void BeginTestCase(string title)
{
- int seed;
-#if WINCORESYS
- seed = 20010415;
-#else
- Random rand = new Random();
+ int seed = DEFAULT_SEED;
if (Environment.GetEnvironmentVariable("CORECLR_SEED") != null)
{
- try
+ string CORECLR_SEED = Environment.GetEnvironmentVariable("CORECLR_SEED");
+
+ if (!int.TryParse(CORECLR_SEED, out seed))
{
- seed = int.Parse(Environment.GetEnvironmentVariable("CORECLR_SEED"));
+ if (string.Equals(CORECLR_SEED, "random", StringComparison.OrdinalIgnoreCase))
+ {
+ seed = new Random().Next();
+ }
+ else
+ {
+ seed = DEFAULT_SEED;
+ }
}
- catch (FormatException) { seed = rand.Next(); }
- }
- else
- {
- seed = rand.Next();
}
-#endif
Generator.m_rand = new Random(seed);
using System.Runtime.CompilerServices;
using TestLibrary;
-#if WINCORESYS
-[assembly: AllowPartiallyTrustedCallers]
-#endif
// Class has two fields, x and y; we consider two instances to be equal (Equals returns true,
// and GetHashCode returns the same for both instances) iff x==x and y==y
class ClassWithEquivalence
using System;
using System.Security;
-#if WINCORESYS
-[assembly: AllowPartiallyTrustedCallers]
-#endif
public class Watcher
{
public static bool f_hasRun = false;
using System;
using System.Security;
-#if WINCORESYS
-[assembly: AllowPartiallyTrustedCallers]
-#endif
public class Watcher
{
public static bool f_hasRun = false;
using System.Collections.Generic;
using System.Threading;
-#if WINCORESYS
-[assembly:AllowPartiallyTrustedCallers]
-#endif
-
public class Test
{
public static bool fail = false;
using System.Threading;
using System.Security;
-#if WINCORESYS
-[assembly: AllowPartiallyTrustedCallers]
-#endif
-
internal class Mainy
{
public static void DoWork()
using System.Threading;
using System.Security;
-#if WINCORESYS
-[assembly: AllowPartiallyTrustedCallers]
-#endif
namespace ThreadPool_Test {
public class Fibonacci {
private int fibnumber;
using System.Security;
using System.Threading;
-#if WINCORESYS
-[assembly:AllowPartiallyTrustedCallers]
-#endif
-
public class CS_ThreadPoolNullChecks {
public static void EventSig(Object state, bool wasSignalled) {
Console.WriteLine("In EventSig: {0}.", Thread.CurrentThread.GetHashCode());