1
+
2
+ function RunTest ([string ] $project , [string ] $description , [bool ] $skipBuild = $false , $filter = $null ) {
3
+ Write-Host " Running test: $description " - ForegroundColor DarkCyan
4
+ Write-Host " -----------------------------------------------------------------------------" - ForegroundColor DarkCyan
5
+ Write-Host
6
+
7
+ $cmdargs = " test" , " .\test\$project \" , " -v" , " q"
8
+
9
+ if ($filter ) {
10
+ $cmdargs += " --filter" , " $filter "
11
+ }
12
+
13
+ # We'll always rebuild for now.
14
+ # if ($skipBuild){
15
+ # $cmdargs += "--no-build"
16
+ # }
17
+ # else {
18
+ # Write-Host "Rebuilding project" -ForegroundColor Red
19
+ # }
20
+
21
+ & dotnet $cmdargs | Out-Host
22
+ $r = $?
23
+
24
+ Write-Host
25
+ Write-Host " -----------------------------------------------------------------------------" - ForegroundColor DarkCyan
26
+ Write-Host
27
+
28
+ return $r
29
+ }
30
+
31
+
32
+ $tests = @ (
33
+ @ {project = " WebJobs.Script.Tests" ; description = " Unit Tests" },
34
+ @ {project = " WebJobs.Script.Scaling.Tests" ; description = " Scaling Tests" },
35
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " Non-E2E integration tests" ; filter = " Category!=E2E" },
36
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " C# end to end tests" ; filter = " E2E=CSharpEndToEndTests" },
37
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " Node end to end tests" ; filter = " E2E=NodeEndToEndTests" },
38
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " Direct load end to end tests" ; filter = " E2E=DirectLoadEndToEndTests" },
39
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " F# end to end tests" ; filter = " E2E=FSharpEndToEndTests" },
40
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " Language worker end to end tests" ; filter = " E2E=LanguageWorkerSelectionEndToEndTests" },
41
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " Node script host end to end tests" ; filter = " E2E=NodeScriptHostTests" },
42
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " Raw assembly end to end tests" ; filter = " E2E=RawAssemblyEndToEndTests" },
43
+ @ {project = " WebJobs.Script.Tests.Integration" ; description = " Samples end to end tests" ; filter = " E2E=SamplesEndToEndTests" }
44
+ )
45
+
46
+ $success = $true
47
+ $testRunSucceeded = $true
48
+
49
+ foreach ($test in $tests ){
50
+ $testRunSucceeded = RunTest $test.project $test.description $testRunSucceeded $test.filter
51
+ $success = $testRunSucceeded -and $success
52
+ }
53
+
54
+ if (-not $success ) { exit 1 }
0 commit comments