diff --git a/Build.cmd b/Build.cmd index 27004d58a3..f2a9a38318 100644 --- a/Build.cmd +++ b/Build.cmd @@ -2,5 +2,5 @@ REM Copyright (c) Microsoft. All rights reserved. -powershell -NoProfile -NoLogo -Command "%~dp0scripts\build.ps1 %*; exit $LastExitCode;" +powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "%~dp0scripts\build.ps1 %*; exit $LastExitCode;" if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/Test.cmd b/Test.cmd new file mode 100644 index 0000000000..84f054f261 --- /dev/null +++ b/Test.cmd @@ -0,0 +1,6 @@ +@echo off + +REM Copyright (c) Microsoft. All rights reserved. + +powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "%~dp0scripts\test.ps1 %*; exit $LastExitCode;" +if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/TestFx.sln b/TestFx.sln index d35ca249a6..267848dc6b 100644 --- a/TestFx.sln +++ b/TestFx.sln @@ -60,16 +60,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesktopTestProjectx86Debug" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesktopTestProjectx86Release", "test\E2ETests\TestAssets\DesktopTestProjectx86Release\DesktopTestProjectx86Release.csproj", "{293597CE-CCF7-4C09-9ADD-17BF34C6E86F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLIAutomation", "test\E2ETests\CLIAutomation\CLIAutomation\CLIAutomation.csproj", "{9C1219E0-E775-47F9-9236-63F03F774801}" - ProjectSection(ProjectDependencies) = postProject - {98BA6D2C-1F3D-4636-8E1D-D4932B7A253D} = {98BA6D2C-1F3D-4636-8E1D-D4932B7A253D} - {A7EA583B-A2B0-47DA-A058-458F247C7575} = {A7EA583B-A2B0-47DA-A058-458F247C7575} - {BBC99A6B-4490-49DD-9C12-AF2C1E95576E} = {BBC99A6B-4490-49DD-9C12-AF2C1E95576E} - {B0FCE474-14BC-449A-91EA-A433342C0D63} = {B0FCE474-14BC-449A-91EA-A433342C0D63} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLISmokeTests", "test\E2ETests\CLIAutomation\CLISmokeTests\CLISmokeTests.csproj", "{A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentTests", "ComponentTests", "{1A9F8CEF-7C03-40BD-B33C-1453114F9ABD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestAssets", "TestAssets", "{1899187D-8B9C-40C2-9F04-9E9A76C9A919}" @@ -78,8 +68,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleFrameworkExtensions", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProjectForDiscovery", "test\ComponentTests\TestAssets\TestProject\TestProjectForDiscovery.csproj", "{771B0933-B811-4002-B455-823C1CC96505}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlatformServices.Desktop.ComponentTests", "test\ComponentTests\PlatformServices.Desktop.ComponentTests\PlatformServices.Desktop.ComponentTests.csproj", "{4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestUtilities", "TestUtilities", "{33D3029D-E653-4929-BB31-C714178C4BEE}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSTest.CoreAdapter.TestUtilities", "test\UnitTests\MSTest.CoreAdapter.TestUtilities\MSTest.CoreAdapter.TestUtilities.csproj", "{F81C7549-E3A3-4770-AC3F-3BC7356E61E8}" @@ -125,6 +113,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Package", "Package", "{E374 src\Package\MSTest.TestFramework.symbols.nuspec = src\Package\MSTest.TestFramework.symbols.nuspec EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlatformServices.Desktop.Component.Tests", "test\ComponentTests\PlatformServices.Desktop.Component.Tests\PlatformServices.Desktop.Component.Tests.csproj", "{4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Smoke.E2E.Tests", "test\E2ETests\Smoke.E2E.Tests\Smoke.E2E.Tests.csproj", "{A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Automation.CLI", "test\E2ETests\Automation.CLI\Automation.CLI.csproj", "{9C1219E0-E775-47F9-9236-63F03F774801}" + ProjectSection(ProjectDependencies) = postProject + {98BA6D2C-1F3D-4636-8E1D-D4932B7A253D} = {98BA6D2C-1F3D-4636-8E1D-D4932B7A253D} + {BBC99A6B-4490-49DD-9C12-AF2C1E95576E} = {BBC99A6B-4490-49DD-9C12-AF2C1E95576E} + {B0FCE474-14BC-449A-91EA-A433342C0D63} = {B0FCE474-14BC-449A-91EA-A433342C0D63} + {0C522C84-B5AF-4DB6-96A2-9EFC15C88589} = {0C522C84-B5AF-4DB6-96A2-9EFC15C88589} + {0C139DA9-AA81-43A0-8625-7A873C0E2873} = {0C139DA9-AA81-43A0-8625-7A873C0E2873} + {293597CE-CCF7-4C09-9ADD-17BF34C6E86F} = {293597CE-CCF7-4C09-9ADD-17BF34C6E86F} + {C6AC27D2-975B-4CF3-B16B-9C17907B2268} = {C6AC27D2-975B-4CF3-B16B-9C17907B2268} + EndProjectSection +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\TestFramework\Extension.Shared\Extension.Shared.projitems*{272ca5e1-8e81-4825-9e47-86cce02f700d}*SharedItemsImports = 13 @@ -560,54 +563,6 @@ Global {293597CE-CCF7-4C09-9ADD-17BF34C6E86F}.Release|x64.Build.0 = Release|Any CPU {293597CE-CCF7-4C09-9ADD-17BF34C6E86F}.Release|x86.ActiveCfg = Release|x86 {293597CE-CCF7-4C09-9ADD-17BF34C6E86F}.Release|x86.Build.0 = Release|x86 - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|ARM.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x64.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x64.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x86.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x86.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|ARM.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|ARM.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x64.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x64.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x86.ActiveCfg = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x86.Build.0 = Debug|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|Any CPU.Build.0 = Release|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|ARM.ActiveCfg = Release|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|ARM.Build.0 = Release|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x64.ActiveCfg = Release|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x64.Build.0 = Release|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x86.ActiveCfg = Release|Any CPU - {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x86.Build.0 = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|ARM.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x64.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x64.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x86.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x86.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|ARM.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x64.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x64.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x86.ActiveCfg = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x86.Build.0 = Debug|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|Any CPU.Build.0 = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|ARM.ActiveCfg = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|ARM.Build.0 = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x64.ActiveCfg = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x64.Build.0 = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x86.ActiveCfg = Release|Any CPU - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x86.Build.0 = Release|Any CPU {5C411BBF-FCC9-4430-AE08-07666D39FD04}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU {5C411BBF-FCC9-4430-AE08-07666D39FD04}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU {5C411BBF-FCC9-4430-AE08-07666D39FD04}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU @@ -656,30 +611,6 @@ Global {771B0933-B811-4002-B455-823C1CC96505}.Release|x64.Build.0 = Release|x64 {771B0933-B811-4002-B455-823C1CC96505}.Release|x86.ActiveCfg = Release|Any CPU {771B0933-B811-4002-B455-823C1CC96505}.Release|x86.Build.0 = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|ARM.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x64.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x64.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x86.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x86.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|ARM.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|ARM.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x64.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x64.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x86.ActiveCfg = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x86.Build.0 = Debug|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|Any CPU.Build.0 = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|ARM.ActiveCfg = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|ARM.Build.0 = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x64.ActiveCfg = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x64.Build.0 = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x86.ActiveCfg = Release|Any CPU - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x86.Build.0 = Release|Any CPU {F81C7549-E3A3-4770-AC3F-3BC7356E61E8}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU {F81C7549-E3A3-4770-AC3F-3BC7356E61E8}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU {F81C7549-E3A3-4770-AC3F-3BC7356E61E8}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU @@ -728,6 +659,78 @@ Global {0A4A76DD-FEE1-4D04-926B-38E1A24A7ED2}.Release|x64.Build.0 = Release|Any CPU {0A4A76DD-FEE1-4D04-926B-38E1A24A7ED2}.Release|x86.ActiveCfg = Release|Any CPU {0A4A76DD-FEE1-4D04-926B-38E1A24A7ED2}.Release|x86.Build.0 = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|ARM.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x64.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x64.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x86.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Code Analysis Debug|x86.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|ARM.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|ARM.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x64.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x64.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x86.ActiveCfg = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Debug|x86.Build.0 = Debug|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|Any CPU.Build.0 = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|ARM.ActiveCfg = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|ARM.Build.0 = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x64.ActiveCfg = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x64.Build.0 = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x86.ActiveCfg = Release|Any CPU + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39}.Release|x86.Build.0 = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|ARM.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x64.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x64.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x86.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Code Analysis Debug|x86.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|ARM.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|ARM.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x64.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x64.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x86.ActiveCfg = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Debug|x86.Build.0 = Debug|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|Any CPU.Build.0 = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|ARM.ActiveCfg = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|ARM.Build.0 = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x64.ActiveCfg = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x64.Build.0 = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x86.ActiveCfg = Release|Any CPU + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0}.Release|x86.Build.0 = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|ARM.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|ARM.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x64.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x64.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x86.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Code Analysis Debug|x86.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|ARM.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|ARM.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x64.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x64.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Debug|x86.Build.0 = Debug|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|Any CPU.Build.0 = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|ARM.ActiveCfg = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|ARM.Build.0 = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x64.ActiveCfg = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x64.Build.0 = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x86.ActiveCfg = Release|Any CPU + {9C1219E0-E775-47F9-9236-63F03F774801}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -758,13 +761,10 @@ Global {C6AC27D2-975B-4CF3-B16B-9C17907B2268} = {D53BD452-F69F-4FB3-8B98-386EDA28A4C8} {0C522C84-B5AF-4DB6-96A2-9EFC15C88589} = {D53BD452-F69F-4FB3-8B98-386EDA28A4C8} {293597CE-CCF7-4C09-9ADD-17BF34C6E86F} = {D53BD452-F69F-4FB3-8B98-386EDA28A4C8} - {9C1219E0-E775-47F9-9236-63F03F774801} = {F1A27537-78D1-4BBD-8E76-ADB31BC0C2B4} - {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0} = {F1A27537-78D1-4BBD-8E76-ADB31BC0C2B4} {1A9F8CEF-7C03-40BD-B33C-1453114F9ABD} = {A9596292-7E67-4566-9096-143DDAA4E8D8} {1899187D-8B9C-40C2-9F04-9E9A76C9A919} = {1A9F8CEF-7C03-40BD-B33C-1453114F9ABD} {5C411BBF-FCC9-4430-AE08-07666D39FD04} = {1899187D-8B9C-40C2-9F04-9E9A76C9A919} {771B0933-B811-4002-B455-823C1CC96505} = {1899187D-8B9C-40C2-9F04-9E9A76C9A919} - {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39} = {1A9F8CEF-7C03-40BD-B33C-1453114F9ABD} {33D3029D-E653-4929-BB31-C714178C4BEE} = {A9596292-7E67-4566-9096-143DDAA4E8D8} {F81C7549-E3A3-4770-AC3F-3BC7356E61E8} = {33D3029D-E653-4929-BB31-C714178C4BEE} {C6F38A55-2B8E-4C5D-A49A-2D0B9D4F10C8} = {A9596292-7E67-4566-9096-143DDAA4E8D8} @@ -774,5 +774,8 @@ Global {DEDA0A36-BC06-403A-BE01-EB04CA7C662C} = {CA01DAF5-8D9D-496E-9AD3-94BB7FBB2D34} {89314305-F815-4969-9B1B-8AEDE109DEC4} = {CA01DAF5-8D9D-496E-9AD3-94BB7FBB2D34} {E374A3A6-C364-4890-B315-D60F5C682B6E} = {FF8B1B72-55A1-4FFE-809E-7B79323ED8D0} + {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39} = {1A9F8CEF-7C03-40BD-B33C-1453114F9ABD} + {A94E3FCA-2FB3-4C79-9F39-5B652B6992F0} = {F1A27537-78D1-4BBD-8E76-ADB31BC0C2B4} + {9C1219E0-E775-47F9-9236-63F03F774801} = {F1A27537-78D1-4BBD-8E76-ADB31BC0C2B4} EndGlobalSection EndGlobal diff --git a/scripts/Build.ps1 b/scripts/Build.ps1 index a5657f28b1..1cd2d89f93 100644 --- a/scripts/Build.ps1 +++ b/scripts/Build.ps1 @@ -2,15 +2,11 @@ # Build script for MSTest Test Framework. [CmdletBinding(PositionalBinding=$false)] -Param( - [switch] $help, - - [string] $target = "Build", - +Param( [Parameter(Mandatory=$false)] [ValidateSet("Debug", "Release")] [Alias("c")] - [string] $Configuration = "Debug", + [System.String] $Configuration = "Debug", [Parameter(Mandatory=$false)] [Alias("fv")] @@ -24,11 +20,38 @@ Param( [Alias("vs")] [System.String] $VersionSuffix = "dev", - [switch] $clearPackageCache, - [switch] $templates, - [switch] $wizards, - [switch] $official, - [switch] $full + [Parameter(Mandatory=$false)] + [System.String] $Target = "Build", + + [Parameter(Mandatory=$false)] + [Alias("h")] + [Switch] $Help = $false, + + [Parameter(Mandatory=$false)] + [Alias("cl")] + [Switch] $Clean = $false, + + [Parameter(Mandatory=$false)] + [Alias("sr")] + [Switch] $SkipRestore = $false, + + [Parameter(Mandatory=$false)] + [Alias("cache")] + [Switch] $ClearPackageCache = $false, + + [Parameter(Mandatory=$false)] + [Alias("tmpl")] + [Switch] $Templates = $false, + + [Parameter(Mandatory=$false)] + [Alias("wiz")] + [Switch] $Wizards = $false, + + [Parameter(Mandatory=$false)] + [Switch] $Official = $false, + + [Parameter(Mandatory=$false)] + [Switch] $Full = $false ) . $PSScriptRoot\common.lib.ps1 @@ -41,13 +64,14 @@ $TFB_Configuration = $Configuration $TFB_FrameworkVersion = $FrameworkVersion $TFB_AdapterVersion = $AdapterVersion $TFB_VersionSuffix = $VersionSuffix +$TFB_SkipRestore = $SkipRestore +$TFB_Clean = $Clean +$TFB_ClearPackageCache = $ClearPackageCache $TFB_Solutions = @("TestFx.sln","Templates\MSTestTemplates.sln","WizardExtensions\WizardExtensions.sln") -$TFB_VSmanprojs =@( -"src\setup\Microsoft.VisualStudio.Templates.CS.MSTestv2.Desktop.UnitTest.vsmanproj", -"src\setup\Microsoft.VisualStudio.Templates.CS.MSTestv2.UWP.UnitTest.vsmanproj", -"src\setup\Microsoft.VisualStudio.TestTools.MSTestV2.WizardExtension.IntelliTest.vsmanproj", -"src\setup\Microsoft.VisualStudio.TestTools.MSTestV2.WizardExtension.UnitTest.vsmanproj" -) +$TFB_VSmanprojs =@("src\setup\Microsoft.VisualStudio.Templates.CS.MSTestv2.Desktop.UnitTest.vsmanproj", + "src\setup\Microsoft.VisualStudio.Templates.CS.MSTestv2.UWP.UnitTest.vsmanproj", + "src\setup\Microsoft.VisualStudio.TestTools.MSTestV2.WizardExtension.IntelliTest.vsmanproj", + "src\setup\Microsoft.VisualStudio.TestTools.MSTestV2.WizardExtension.UnitTest.vsmanproj") # # Script Preferences @@ -58,24 +82,26 @@ $ErrorActionPreference = "Stop" # Prints help text for the switches this script supports. # function Print-Help { - if (-not $help) { + if (-not $Help) { return } Write-Host -object "" - Write-Host -object "MSTest Adapter Build Script" + Write-Host -object "********* MSTest Adapter Build Script *********" Write-Host -object "" - Write-Host -object " Help - [Switch] - Prints this help message." - Write-Host -object " ClearPackageCache - [Switch] - Indicates local package cache should be cleared before restore." - Write-Host -object " Templates - [Switch] - Indicates Templates should also be build." - Write-Host -object " Wizards - [Switch] - Indicates WizardExtensions should also be build." - Write-Host -object " Official - [Switch] - Indicates that this is an official build." + Write-Host -object " Help (-h) - [Switch] - Prints this help message." + Write-Host -object " Clean (-cl) - [Switch] - Indicates that this should be a clean build." + Write-Host -object " SkipRestore (-sr) - [Switch] - Indicates nuget package restoration should be skipped." + Write-Host -object " ClearPackageCache (-cache) - [Switch] - Indicates local package cache should be cleared before restore." + Write-Host -object " Templates (-tmpl) - [Switch] - Indicates Templates should also be built." + Write-Host -object " Wizards (-wiz) - [Switch] - Indicates WizardExtensions should also be built." + Write-Host -object " Official - [Switch] - Indicates that this is an official build. Only used in CI builds." Write-Host -object " Full - [Switch] - Indicates to perform a full build which includes Adapter,Framework,Templates,Wizards, and vsmanprojs." Write-Host -object "" - Write-Host -object " Configuration - [String] - Specifies the build configuration. Defaults to 'Debug'." - Write-Host -object " FrameworkVersion - [String] - Specifies the version of the Test Framework nuget package." - Write-Host -object " AdapterVersion - [String] - Specifies the version of the Test Adapter nuget package." - Write-Host -object " VersionSuffix - [String] - Specifies the version suffix for the nuget packages." + Write-Host -object " Configuration (-c) - [String] - Specifies the build configuration. Defaults to 'Debug'." + Write-Host -object " FrameworkVersion (-fv) - [String] - Specifies the version of the Test Framework nuget package." + Write-Host -object " AdapterVersion (-av) - [String] - Specifies the version of the Test Adapter nuget package." + Write-Host -object " VersionSuffix (-vs) - [String] - Specifies the version suffix for the nuget packages." Write-Host -object " Target - [String] - Specifies the build target. Defaults to 'Build'." Write-Host -object "" @@ -90,32 +116,38 @@ function Perform-Restore { Write-Log "Perform-Restore: Started." + if($TFB_SkipRestore) + { + Write-Log "Perform-Restore: Skipped." + return; + } + $nuget = Locate-NuGet $nugetConfig = Locate-NuGetConfig $toolset = Locate-Toolset - if ($clearPackageCache) { - Write-Host -object "Clearing local package cache..." + if ($TFB_ClearPackageCache) { + Write-Log " Clearing local package cache..." & $nuget locals all -clear } - Write-Host -object "Starting toolset restore..." - Write-Host -object "$nuget restore -msbuildVersion $msbuildVersion -verbosity quiet -nonInteractive -configFile $nugetConfig $toolset" + Write-Log " Starting toolset restore..." + Write-Verbose "$nuget restore -msbuildVersion $msbuildVersion -verbosity quiet -nonInteractive -configFile $nugetConfig $toolset" & $nuget restore -msbuildVersion $msbuildVersion -verbosity quiet -nonInteractive -configFile $nugetConfig $toolset if ($lastExitCode -ne 0) { throw "The restore failed with an exit code of '$lastExitCode'." } - Write-Host -object "Locating MSBuild install path..." + Write-Verbose "Locating MSBuild install path..." $msbuildPath = Locate-MSBuildPath - Write-Host -object "Starting solution restore..." + Write-Verbose "Starting solution restore..." foreach($solution in $TFB_Solutions) { $solutionPath = Locate-Solution -relativePath $solution - Write-Host -object "$nuget restore -msbuildPath $msbuildPath -verbosity quiet -nonInteractive -configFile $nugetConfig $solutionPath" + Write-Verbose "$nuget restore -msbuildPath $msbuildPath -verbosity quiet -nonInteractive -configFile $nugetConfig $solutionPath" & $nuget restore -msbuildPath $msbuildPath -verbosity quiet -nonInteractive -configFile $nugetConfig $solutionPath } @@ -134,19 +166,31 @@ function Perform-Build { Write-Log "Perform-Build: Started." + if($TFB_Clean) + { + $foldersToDel = @( $TFB_Configuration, "TestAssets" ) + Write-Log " Clean build requested." + foreach($folder in $foldersToDel) + { + $outDir = Join-Path $env:TF_OUT_DIR -ChildPath $folder + Write-Output " Deleting $outDir" + Remove-Item -Recurse -Force $outDir + } + } + Invoke-Build -solution "TestFx.sln" - if($templates -or $full) + if($Templates -or $Full) { Invoke-Build -solution "Templates\MSTestTemplates.sln" } - if($wizards -or $full) + if($Wizards -or $Full) { Invoke-Build -solution "WizardExtensions\WizardExtensions.sln" } - if($official) + if($Official) { Build-vsmanprojs } @@ -158,10 +202,14 @@ function Invoke-Build([string] $solution) { $msbuild = Locate-MSBuild $solutionPath = Locate-Solution -relativePath $solution - - Write-Host -object "Starting $solution build..." - Write-Host -object "$msbuild /t:$target /p:Configuration=$configuration /tv:$msbuildVersion /v:q /m $solutionPath" - & $msbuild /t:$target /p:Configuration=$configuration /tv:$msbuildVersion /v:q /m $solutionPath + $solutionDir = [System.IO.Path]::GetDirectoryName($solutionPath) + $solutionSummaryLog = Join-Path -path $solutionDir -childPath "msbuild.log" + $solutionWarningLog = Join-Path -path $solutionDir -childPath "msbuild.wrn" + $solutionFailureLog = Join-Path -path $solutionDir -childPath "msbuild.err" + + Write-Log " Building $solution..." + Write-Verbose "$msbuild /t:$Target /p:Configuration=$configuration /tv:$msbuildVersion /v:m /flp1:Summary`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$solutionSummaryLog /flp2:WarningsOnly`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$solutionWarningLog /flp3:ErrorsOnly`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$solutionFailureLog $solutionPath" + & $msbuild /t:$Target /p:Configuration=$configuration /tv:$msbuildVersion /v:m /flp1:Summary`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$solutionSummaryLog /flp2:WarningsOnly`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$solutionWarningLog /flp3:ErrorsOnly`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$solutionFailureLog $solutionPath if ($lastExitCode -ne 0) { throw "Build failed with an exit code of '$lastExitCode'." @@ -176,9 +224,9 @@ function Build-vsmanprojs { $vsmanprojPath = Locate-Solution -relativePath $vsmanproj - Write-Host -object "Starting $vsmanproj build..." - Write-Host -object "$msbuild /t:$target /p:Configuration=$configuration /tv:$msbuildVersion /m /p:TargetExt=.vsman $vsmanprojPath" - & $msbuild /t:$target /p:Configuration=$configuration /tv:$msbuildVersion /m /p:TargetExt=.vsman $vsmanprojPath + Write-Log " Building $vsmanproj..." + Write-Verbose "$msbuild /t:$Target /p:Configuration=$configuration /tv:$msbuildVersion /m /p:TargetExt=.vsman $vsmanprojPath" + & $msbuild /t:$Target /p:Configuration=$configuration /tv:$msbuildVersion /m /p:TargetExt=.vsman $vsmanprojPath if ($lastExitCode -ne 0) { throw "VSManProj build failed with an exit code of '$lastExitCode'." @@ -200,7 +248,7 @@ function Create-NugetPackages $tfSrcPackageDir = Join-Path $env:TF_SRC_DIR "Package" # Copy over the nuspecs to the staging directory - if($official) + if($Official) { $nuspecFiles = @("MSTest.TestAdapter.Dotnet.nuspec", "MSTest.TestAdapter.nuspec", "MSTest.TestAdapter.symbols.nuspec", "MSTest.TestFramework.nuspec", "MSTest.TestFramework.symbols.nuspec") } @@ -231,28 +279,6 @@ function Create-NugetPackages Write-Log "Create-NugetPackages: Complete. {$(Get-ElapsedTime($timer))}" } -function Start-Timer -{ - return [System.Diagnostics.Stopwatch]::StartNew() -} - -function Get-ElapsedTime([System.Diagnostics.Stopwatch] $timer) -{ - $timer.Stop() - return $timer.Elapsed -} - -function Write-Log ([string] $message) -{ - $currentColor = $Host.UI.RawUI.ForegroundColor - $Host.UI.RawUI.ForegroundColor = "Green" - if ($message) - { - Write-Output "... $message" - } - $Host.UI.RawUI.ForegroundColor = $currentColor -} - Print-Help Perform-Restore Perform-Build diff --git a/scripts/common.lib.ps1 b/scripts/common.lib.ps1 index 67088fa654..b2bd5ecc43 100644 --- a/scripts/common.lib.ps1 +++ b/scripts/common.lib.ps1 @@ -14,6 +14,7 @@ $global:nugetUrl = "https://dist.nuget.org/win-x86-commandline/v$nugetVersion/Nu $env:TF_ROOT_DIR = (Get-Item (Split-Path $MyInvocation.MyCommand.Path)).Parent.FullName $env:TF_OUT_DIR = Join-Path $env:TF_ROOT_DIR "artifacts" $env:TF_SRC_DIR = Join-Path $env:TF_ROOT_DIR "src" +$env:TF_TEST_DIR = Join-Path $env:TF_ROOT_DIR "test" $env:TF_PACKAGES_DIR = Join-Path $env:TF_ROOT_DIR "packages" @@ -110,7 +111,7 @@ function Locate-VsInstallPath { Add-Type -path $locateVsApi $vsInstallPath = [LocateVS.Instance]::GetInstallPath($msbuildVersion, $requiredPackageIds) - Write-Host -object "VSInstallPath is : $vsInstallPath" + Write-Verbose "VSInstallPath is : $vsInstallPath" return Resolve-Path -path $vsInstallPath } @@ -130,3 +131,25 @@ function Locate-Solution([string] $relativePath) { $solution = Join-Path -path $rootPath -childPath $relativePath return Resolve-Path -path $solution } + +function Start-Timer +{ + return [System.Diagnostics.Stopwatch]::StartNew() +} + +function Get-ElapsedTime([System.Diagnostics.Stopwatch] $timer) +{ + $timer.Stop() + return $timer.Elapsed +} + +function Write-Log ([string] $message, $messageColor = "Green") +{ + $currentColor = $Host.UI.RawUI.ForegroundColor + $Host.UI.RawUI.ForegroundColor = $messageColor + if ($message) + { + Write-Output "... $message" + } + $Host.UI.RawUI.ForegroundColor = $currentColor +} diff --git a/scripts/test.ps1 b/scripts/test.ps1 new file mode 100644 index 0000000000..72b8d67e39 --- /dev/null +++ b/scripts/test.ps1 @@ -0,0 +1,146 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [Parameter(Mandatory=$false)] + [ValidateSet("Debug", "Release")] + [Alias("c")] + [string] $Configuration = "Debug", + + [Parameter(Mandatory=$false)] + [Alias("p")] + [System.String] $Pattern = "UnitTests", + + [Parameter(Mandatory=$false)] + [Alias("pl")] + [Switch] $Parallel = $false, + + [Parameter(Mandatory=$false)] + [Switch] $All = $false, + + [Parameter(Mandatory=$false)] + [Alias("h")] + [Switch] $Help = $false +) + +. $PSScriptRoot\common.lib.ps1 + +# +# Script Preferences +# +$ErrorActionPreference = "Stop" + +# +# Variables +# +$env:TF_TESTS_OUTDIR_PATTERN = "*.Tests" +$env:TF_UNITTEST_FILES_PATTERN = "*.UnitTests*.dll" +$env:TF_COMPONENTTEST_FILES_PATTERN = "*.ComponentTests*.dll" +$env:TF_E2ETEST_FILES_PATTERN = "*.E2ETests*.dll" + +# +# Test configuration +# +Write-Verbose "Setup build configuration." +$TFT_Configuration = $Configuration +$TFT_Pattern = $Pattern +$TFT_Parallel = $Parallel +$TFT_All = $All + +# +# Prints help text for the switches this script supports. +# +function Print-Help { + if (-not $Help) { + return + } + + Write-Host -object "" + Write-Host -object "********* MSTest Adapter Test Script *********" + Write-Host -object "" + Write-Host -object " Help (-h) - [Switch] - Prints this help message." + Write-Host -object " Parallel (-pl) - [Switch] - Indicates that the tests should be run in parallel." + Write-Host -object " All - [Switch] - Indicates that all tests should be run. This ignores the pattern provided." + Write-Host -object "" + Write-Host -object " Configuration (-c) - [String] - Specifies the build configuration. Defaults to 'Debug'." + Write-Host -object " Pattern (-p) - [String] - Runs tests from the test container that matches this pattern. For instance, specify -p E2E to run all End-to-End tests. Alternatively specifying -p TestFramework.UnitTests runs only tests from Microsoft.VisualStudio.TestPlatform.TestFramework.UnitTests.dll." + + Write-Host -object "" + Exit 0 +} + +function Invoke-Test +{ + $timer = Start-Timer + + Write-Log "Run-Test: Started." + + Write-Log " Computing Test Containers." + # Get all the test project folders. They should all be ending with ".Tests" + $outDir = Join-Path $env:TF_OUT_DIR -ChildPath $TFT_Configuration + $testFolders = Get-ChildItem $outDir -Directory -Filter $env:TF_TESTS_OUTDIR_PATTERN | %{$_.FullName} + + # Get test assemblies from these folders that match the pattern specified. + foreach($container in $testFolders) + { + $testContainer = Get-ChildItem $container\* -Recurse -Include $env:TF_UNITTEST_FILES_PATTERN, $env:TF_COMPONENTTEST_FILES_PATTERN, $env:TF_E2ETEST_FILES_PATTERN + + $testContainerName = $testContainer.Name + $testContainerPath = $testContainer.FullName + $allContainers += ,"$testContainerName" + + if($TFT_All) + { + $testContainers += ,"$testContainerPath" + } + else + { + if($testContainerPath -match $TFT_Pattern) + { + $testContainers += ,"$testContainerPath" + } + } + } + + if($testContainers.Count -gt 0) + { + $testContainersString = [system.String]::Join(",",$testContainers) + Write-Log " Matched Test Containers: $testContainersString." + Run-Test($testContainers) + } + else + { + $allContainersString = [system.String]::Join(",",$allContainers) + Write-Log " None of the test containers matched the pattern $TFT_Pattern." + Write-Log " Test Containers available: $allContainersString." + } + + Write-Log "Run-Test: Complete. {$(Get-ElapsedTime($timer))}" +} + +function Run-Test($testContainers) +{ + $vstestPath = Get-VSTestPath + + if(!(Test-Path $vstestPath)) + { + Write-Error "Unable to find vstest.console.exe at $vstestPath. Test aborted." + } + + $additionalArguments = '' + if($TFT_Parallel) + { + $additionalArguments += "/parallel" + } + + Write-Verbose "$vstestPath $testContainers $additionalArguments /logger:trx" + & $vstestPath $testContainers $additionalArguments /logger:trx +} + +function Get-VSTestPath +{ + $vsInstallPath = Locate-VsInstallPath + $vstestPath = Join-Path -path $vsInstallPath "Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" + return Resolve-Path -path $vstestPath +} + +Print-Help +Invoke-Test \ No newline at end of file diff --git a/test/ComponentTests/PlatformServices.Desktop.ComponentTests/PlatformServices.Desktop.ComponentTests.csproj b/test/ComponentTests/PlatformServices.Desktop.Component.Tests/PlatformServices.Desktop.Component.Tests.csproj similarity index 94% rename from test/ComponentTests/PlatformServices.Desktop.ComponentTests/PlatformServices.Desktop.ComponentTests.csproj rename to test/ComponentTests/PlatformServices.Desktop.Component.Tests/PlatformServices.Desktop.Component.Tests.csproj index ac047d2973..dc5fd6b5f6 100644 --- a/test/ComponentTests/PlatformServices.Desktop.ComponentTests/PlatformServices.Desktop.ComponentTests.csproj +++ b/test/ComponentTests/PlatformServices.Desktop.Component.Tests/PlatformServices.Desktop.Component.Tests.csproj @@ -1,7 +1,10 @@  - ..\..\..\ + ..\..\..\ + + + Debug AnyCPU {4EA6EED3-0579-4C7C-94EA-52B2AD2A9D39} @@ -23,7 +26,6 @@ true full false - bin\Debug\ DEBUG;TRACE prompt 4 @@ -31,7 +33,6 @@ pdbonly true - bin\Release\ TRACE prompt 4 @@ -74,7 +75,7 @@ - +