Test.ps1 (627B)
1 # Copyright (c) Microsoft Corporation. 2 # Licensed under the MIT License. 3 4 <# 5 .SYNOPSIS 6 Simplifies test commands for the SFS Client. 7 8 .DESCRIPTION 9 This script will contain the test commands for the SFS Client. 10 Use this on Windows platforms in a PowerShell session. 11 12 .EXAMPLE 13 PS> ./scripts/Test.ps1 14 #> 15 param ( 16 [switch] $OutputOnFailure = $false 17 ) 18 19 $GitRoot = (Resolve-Path (&git -C $PSScriptRoot rev-parse --show-toplevel)).Path 20 $BuildFolder = "$GitRoot/build" 21 22 $cmd = "ctest --test-dir ""$BuildFolder/client""" 23 if ($OutputOnFailure) 24 { 25 $cmd += " --output-on-failure" 26 } 27 28 Invoke-Expression $cmd