diff options
author | Aaron Robinson <arobins@microsoft.com> | 2019-05-12 17:23:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-12 17:23:51 -0700 |
commit | 42a4b41cae99215da49388dad4dc2810f83365c3 (patch) | |
tree | dd9fe6f7efc31156827f814af99f885d2edc6c8a /tests | |
parent | 88625deceacc8c5233b7e56d574455be68f3ea9b (diff) | |
download | coreclr-42a4b41cae99215da49388dad4dc2810f83365c3.tar.gz coreclr-42a4b41cae99215da49388dad4dc2810f83365c3.tar.bz2 coreclr-42a4b41cae99215da49388dad4dc2810f83365c3.zip |
Cleanup some build files (#24539)
* Remove OsEnvironment, PackagesDir, and CoreCLRBinDir properties
* Replace usage of __BuildArch with BuildArch
* Simplify test timing out on ARM64
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dir.props | 10 | ||||
-rw-r--r-- | tests/src/JIT/Methodical/tailcall/Desktop/thread-race.cs | 18 |
2 files changed, 13 insertions, 15 deletions
diff --git a/tests/dir.props b/tests/dir.props index 9da3cb3791..296a29a4d7 100644 --- a/tests/dir.props +++ b/tests/dir.props @@ -1,13 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <!-- - $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix. - --> - <PropertyGroup> - <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment> - <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment> - </PropertyGroup> - <Import Project="dir.sdkbuild.props" Condition="'$(UsingMicrosoftNETSdk)' == 'true'" /> <PropertyGroup> @@ -62,8 +54,6 @@ <BinDir>$(__BinDir)\</BinDir> <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir> - <CoreCLRBinDir>$(RootBinDir)Product\$(__BuildOS).$(__BuildArch).$(__BuildType)\</CoreCLRBinDir> - <AltJitArch>$(__AltJitArch)</AltJitArch> </PropertyGroup> diff --git a/tests/src/JIT/Methodical/tailcall/Desktop/thread-race.cs b/tests/src/JIT/Methodical/tailcall/Desktop/thread-race.cs index 9746d34790..97acf33231 100644 --- a/tests/src/JIT/Methodical/tailcall/Desktop/thread-race.cs +++ b/tests/src/JIT/Methodical/tailcall/Desktop/thread-race.cs @@ -4,16 +4,24 @@ using System; using System.Threading; -using System.Runtime.CompilerServices; internal class Repro { private static volatile bool s_threadsCompleted; private static volatile Mutex s_myMutex; private static volatile int[] s_threadSum; + private const int FibSeriesMax = 35; + private const int FibSeriesMin = 20; public static int Main() { + // Compute the expected value for a single thread + int expectedSingle = 0; + for (int i = FibSeriesMin; i <= FibSeriesMax; i++) + { + expectedSingle += fib(0, i); + } + ThreadStart ts = new ThreadStart(FibThread); Thread t1 = new Thread(ts); Thread t2 = new Thread(ts); @@ -42,9 +50,9 @@ internal class Repro threadValue = (s_threadSum[0] + s_threadSum[1] + s_threadSum[2]); - if (((long)54018518 * 3) != threadValue) + if (((long)expectedSingle * 3) != threadValue) { - Console.WriteLine("FALSE: {0} != {1}", ((long)439201 * 3), threadValue); + Console.WriteLine("FALSE: {0} != {1}", ((long)expectedSingle * 3), threadValue); return 0; } else @@ -57,9 +65,9 @@ internal class Repro public static void FibThread() { int sum = 0; - const int length = 35; + const int length = FibSeriesMax; - for (int i = 0; i <= length; i++) + for (int i = FibSeriesMin; i <= length; i++) { sum += fib(0, i); Console.WriteLine("" + i + ": " + sum); |