This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 181
Expand file tree
/
Copy pathtest.ps1
More file actions
54 lines (39 loc) · 1.87 KB
/
test.ps1
File metadata and controls
54 lines (39 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
$ErrorActionPreference = 'Stop'
& "$PSScriptRoot/set-env.ps1"
$all_ok = $True
function Test-One {
Param($project)
dotnet test (Join-Path $PSScriptRoot $project) `
-c $Env:BUILD_CONFIGURATION `
-v $Env:BUILD_VERBOSITY `
--logger trx `
/property:DefineConstants=$Env:ASSEMBLY_CONSTANTS `
/property:Version=$Env:ASSEMBLY_VERSION
if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to test $project."
$script:all_ok = $False
}
}
Write-Host "##[info]Testing Standard/tests/Standard.Tests.csproj"
Test-One '../Standard/tests/Standard.Tests.csproj'
Write-Host "##[info]Testing Chemistry/tests/ChemistryTests/QSharpTests.csproj"
Test-One '../Chemistry/tests/ChemistryTests/QSharpTests.csproj'
Write-Host "##[info]Testing Chemistry/tests/SystemTests/SystemTests.csproj"
Test-One '../Chemistry/tests/SystemTests/SystemTests.csproj'
Write-Host "##[info]Testing Chemistry/tests/DataModelTests/DataModelTests.csproj"
Test-One '../Chemistry/tests/DataModelTests/DataModelTests.csproj'
Write-Host "##[info]Testing Chemistry/tests/JupyterTests/JupyterTests.csproj"
Test-One '../Chemistry/tests/JupyterTests/JupyterTests.csproj'
Write-Host "##[info]Testing Numerics/tests/NumericsTests.csproj"
Test-One '../Numerics/tests/NumericsTests.csproj'
Write-Host "##[info]Testing Qaoa/tests/QaoaTests/QaoaTests.csproj"
Test-One '../Qaoa/tests/QaoaTests/QaoaTests.csproj'
Write-Host "##[info]Testing Qaoa/tests/HybridQaoaTests/HybridQaoaTests.csproj"
Test-One '../Qaoa/tests/HybridQaoaTests/HybridQaoaTests.csproj'
Write-Host "##[info]Testing Qaoa/tests/JupyterTests/JupyterTests.csproj"
Test-One '../Qaoa/tests/JupyterTests/JupyterTests.csproj'
if (-not $all_ok) {
throw "At least one test failed execution. Check the logs."
}