diff options
-rw-r--r-- | tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs | 2 | ||||
-rw-r--r-- | tests/src/GC/Stress/Framework/ReliabilityFramework.cs | 10 | ||||
-rw-r--r-- | tests/src/GC/Stress/Framework/ReliabilityFramework.csproj | 18 | ||||
-rw-r--r-- | tests/src/GC/Stress/stress_run_readme.txt | 6 | ||||
-rw-r--r-- | tests/src/dir.targets | 4 | ||||
-rw-r--r-- | tests/testsFailingOutsideWindows.txt | 1 |
6 files changed, 20 insertions, 21 deletions
diff --git a/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs b/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs index f0d6627090..f5fe8dbb8e 100644 --- a/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs +++ b/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs @@ -169,7 +169,7 @@ public class ReliabilityConfig : IEnumerable, IEnumerator } - private int ConvertTimeValueToTestRunTime(string timeValue) + public static int ConvertTimeValueToTestRunTime(string timeValue) { int returnValue; diff --git a/tests/src/GC/Stress/Framework/ReliabilityFramework.cs b/tests/src/GC/Stress/Framework/ReliabilityFramework.cs index 8877e262e6..6aaeddf2f2 100644 --- a/tests/src/GC/Stress/Framework/ReliabilityFramework.cs +++ b/tests/src/GC/Stress/Framework/ReliabilityFramework.cs @@ -103,6 +103,7 @@ public class ReliabilityFramework // static members private static int s_seed = (int)System.DateTime.Now.Ticks; private static Random s_randNum = new Random(s_seed); + private static string timeValue = null; private static bool s_fNoExit = false; #if !PROJECTK_BUILD static string myProcessName = null; @@ -120,7 +121,7 @@ public class ReliabilityFramework { string configFile = null; bool okToContinue = true, doReplay = false; - string sTests = "tests", sSeed = "seed"; + string sTests = "tests", sSeed = "seed",exectime ="maximumExecutionTime"; ReliabilityFramework rf = new ReliabilityFramework(); rf._logger.WriteToInstrumentationLog(null, LoggingLevels.StartupShutdown, "Started"); @@ -147,6 +148,10 @@ public class ReliabilityFramework s_seed = Convert.ToInt32(arg.Substring(sSeed.Length + 2)); s_randNum = new Random(s_seed); } + else if (String.Compare(arg.Substring(1, arg.IndexOf(':') - 1), exectime, true) == 0) + { + timeValue = arg.Substring(exectime.Length + 2); + } else { Console.WriteLine("Unknown option: {0}", arg); @@ -314,6 +319,9 @@ public class ReliabilityFramework _testsRunningCount = 0; _testsRanCount = 0; _curTestSet = testSet; + if (timeValue != null) + _curTestSet.MaximumTime = ReliabilityConfig.ConvertTimeValueToTestRunTime(timeValue); + _logger.ReportResults = _curTestSet.ReportResults; #if !PROJECTK_BUILD diff --git a/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj b/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj index 948308251f..2ea46451a2 100644 --- a/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj +++ b/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -14,11 +13,11 @@ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath> <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> - <CLRTestKind>BuildOnly</CLRTestKind> + <CLRTestKind>BuildAndRun</CLRTestKind> + <CLRTestPriority>1</CLRTestPriority> + <CLRTestExecutionArguments>testmix_gc.config /maximumExecutionTime:-1</CLRTestExecutionArguments> <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> <DefineConstants>$(DefineConstants);STATIC;PROJECTK_BUILD</DefineConstants> - <!--This test is to be run manually for now --> - <GenerateRunScript>false</GenerateRunScript> </PropertyGroup> <!-- Default configurations to help VS understand the configurations --> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> @@ -51,17 +50,12 @@ <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> - <ItemGroup> <StressTests Include="..\Tests\*.csproj" /> </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> <Target Name="AfterBuild"> - <MSBuild Projects="@(StressTests)" /> - <MakeDir Directories="$(OutDir)\Tests" /> - <ItemGroup> - <TestExesToCopy Include="$(OutDir)..\Tests\*.*" /> - </ItemGroup> - <Copy SourceFiles="@(TestExesToCopy)" DestinationFolder="$(OutDir)\Tests" /> + <MSBuild Projects="@(StressTests)" Properties="OutputPath=$(OutDir)\Tests" /> </Target> -</Project>
\ No newline at end of file +</Project> diff --git a/tests/src/GC/Stress/stress_run_readme.txt b/tests/src/GC/Stress/stress_run_readme.txt index 27e70ff05b..56b9ff556f 100644 --- a/tests/src/GC/Stress/stress_run_readme.txt +++ b/tests/src/GC/Stress/stress_run_readme.txt @@ -12,15 +12,15 @@ This is a pretty crude implementation. Feel free to improve it! It has 3 parts: -The stress framework is built from <REPO_ROOT>\tests\src\GC\Stress\Framework and the resulting .exe is in <REPO_ROOT>\binaries\tests\<arch>\<buildtype>\GC\Stress\Framework\ReliabilityFramework.exe. +The stress framework is built from <REPO_ROOT>\tests\src\GC\Stress\Framework -The tests are built from <REPO_ROOT>\tests\src\GC\Stress\Tests and the resulting .exe's are in <REPO_ROOT>\binaries\tests\<arch>\<buildtype>\GC\Stress\Framework\*.exe. +The tests are built from <REPO_ROOT>\tests\src\GC\Stress\Tests The config is at <REPO_ROOT>NDP\clr\tests\src\GC\Stress\testmix_gc.config, this will be copied to the output folder of Framework 3. Running stress -The test .exe's need to be in a directory called Tests next to ReliabilityFramework.exe. So if you keep ReliabilityFramework.exe where it is, you should see the test binaries copied to the <REPO_ROOT>\tests\src\GC\Stress\Framework\Tests. +The test .exe's need to be in a directory called Tests next to ReliabilityFramework.exe. So if you keep ReliabilityFramework.exe where it is, you should see the test binaries copied to the <TestBin>\GC\Stress\Framework\ReliabilityFramework\Tests. To run stress: diff --git a/tests/src/dir.targets b/tests/src/dir.targets index dac50026dc..05ae65acb2 100644 --- a/tests/src/dir.targets +++ b/tests/src/dir.targets @@ -111,10 +111,6 @@ Condition="'$(GenerateRunScript)' != 'false' And ('$(_WillCLRTestProjectBuild)')" DependsOnTargets="GenerateExecutionScriptsInternal" /> - <PropertyGroup> - <OutDir>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutDir> - </PropertyGroup> - <Target Name="CopyNativeProjectBinaries"> <ItemGroup> <NativeProjectBinaries Include="$(NativeProjectOutputFolder)\**\*.*" /> diff --git a/tests/testsFailingOutsideWindows.txt b/tests/testsFailingOutsideWindows.txt index de26f70c08..8049d7f683 100644 --- a/tests/testsFailingOutsideWindows.txt +++ b/tests/testsFailingOutsideWindows.txt @@ -182,3 +182,4 @@ GC/Features/SustainedLowLatency/sustainedlowlatency_race_reverse/sustainedlowlat GC/Features/SustainedLowLatency/scenario/scenario.sh GC/Features/SustainedLowLatency/sustainedlowlatency_race/sustainedlowlatency_race.sh GC/Regressions/dev10bugs/536168/536168/536168.sh +GC/Stress/Framework/ReliabilityFramework/ReliabilityFramework.sh |