diff --git a/build-test.cmd b/build-test.cmd index c0f45b10cc9a..29bc779729ed 100644 --- a/build-test.cmd +++ b/build-test.cmd @@ -121,6 +121,16 @@ if defined __BuildAgainstPackagesArg ( ) ) +set TargetsWindowsArg= +set TargetsWindowsMsbuildArg= +if "%__TargetsWindows%"=="1" ( + set TargetsWindowsArg=-TargetsWindows=true + set TargetsWindowsMsbuildArg=/p:TargetsWindows=true +) else if "%__TargetsWindows%"=="0" ( + set TargetsWindowsArg=-TargetsWindows=false + set TargetsWindowsMsbuildArg=/p:TargetsWindows=false +) + @if defined _echo @echo on set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch% @@ -324,8 +334,9 @@ for /l %%G in (1, 1, %__BuildLoopCount%) do ( set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%";Append=!__AppendToLog! set TestBuildSlice=%%G - echo Running: msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% !__PriorityMsbuildArg! %__UnprocessedBuildArgs% - call msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% !__PriorityMsbuildArg! %__UnprocessedBuildArgs% + echo Running: msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %TargetsWindowsMsbuildArg% %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% !__PriorityMsbuildArg! %__UnprocessedBuildArgs% + + call msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %TargetsWindowsMsbuildArg% %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% !__PriorityMsbuildArg! %__UnprocessedBuildArgs% if errorlevel 1 ( echo %__MsgPrefix%Error: build failed. Refer to the build log files for details: @@ -398,16 +409,6 @@ if defined __RuntimeId ( set RuntimeIdArg=-RuntimeID="%__RuntimeId%" ) -set TargetsWindowsArg= -set TargetsWindowsMsbuildArg= -if "%__TargetsWindows%"=="1" ( - set TargetsWindowsArg=-TargetsWindows=true - set TargetsWindowsMsbuildArg=/p:TargetsWindows=true -) else if "%__TargetsWindows%"=="0" ( - set TargetsWindowsArg=-TargetsWindows=false - set TargetsWindowsMsbuildArg=/p:TargetsWindows=false -) - set __BuildLogRootName=Tests_Overlay_Managed set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn diff --git a/tests/runtest.proj b/tests/runtest.proj index ea9a0d15ec52..3a04064ddbe0 100644 --- a/tests/runtest.proj +++ b/tests/runtest.proj @@ -57,9 +57,7 @@ true - true + true diff --git a/tests/src/Interop/common/Assertion.cs b/tests/src/Interop/common/Assertion.cs index 30dd072a7581..4a7bd6373281 100644 --- a/tests/src/Interop/common/Assertion.cs +++ b/tests/src/Interop/common/Assertion.cs @@ -15,7 +15,7 @@ namespace CoreFXTestLibrary /// unit tests. If the condition being tested is not met, an exception /// is thrown. /// - public static class Assert + internal static class Assert { /// /// Asserts that the given delegate throws an with the given parameter name. @@ -771,7 +771,7 @@ private static async Task RunWithCatchAsync(Func action) /// /// Exception raised by the Assert on Fail /// - public class AssertTestException : Exception + internal class AssertTestException : Exception { public AssertTestException(string message) : base(message) @@ -784,7 +784,7 @@ public AssertTestException() } } - public static class ExceptionAssert + internal static class ExceptionAssert { public static void Throws(String message, Action a) where T : Exception { @@ -796,7 +796,7 @@ public static void Throws(String message, Action a) where T : Exception /// Specifies whether should require an exact type match when comparing the expected exception type with the thrown exception. /// [Flags] - public enum AssertThrowsOptions + internal enum AssertThrowsOptions { /// /// Specifies that should require an exact type diff --git a/tests/src/dir.props b/tests/src/dir.props index c5cc702882df..9c367e208de4 100644 --- a/tests/src/dir.props +++ b/tests/src/dir.props @@ -78,7 +78,10 @@ - true + + true win-$(__BuildArch) @@ -111,8 +114,8 @@ - $(__RuntimeId) - $(TestNugetRuntimeId) + $(__RuntimeId) + $(TestNugetRuntimeId) diff --git a/tests/src/dir.targets b/tests/src/dir.targets index 64f0d804f85d..147c70eaa11f 100644 --- a/tests/src/dir.targets +++ b/tests/src/dir.targets @@ -76,11 +76,11 @@ - - false + + false <_WillCLRTestProjectBuild Condition="'$(_WillCLRTestProjectBuild)' == ''">false - <_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' != true">true - <_WillCLRTestProjectBuild Condition="'$(DisableProjectBuild)' != true And '$(BuildAllProjects)' == true And '$(CLRTestPriority)' <= '$(CLRTestPriorityToBuild)'">true + <_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' != 'true'">true + <_WillCLRTestProjectBuild Condition="'$(DisableProjectBuild)' != 'true' And '$(BuildAllProjects)' == 'true' And '$(CLRTestPriority)' <= '$(CLRTestPriorityToBuild)'">true @@ -91,7 +91,7 @@ - + @@ -114,7 +114,7 @@ diff --git a/tests/src/runonly.targets b/tests/src/runonly.targets index 2e01bc7ec8e8..9ae83c648a74 100644 --- a/tests/src/runonly.targets +++ b/tests/src/runonly.targets @@ -5,7 +5,7 @@ - +