forked from vipmike007/whql_powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenerateJobSummary.ps1
71 lines (53 loc) · 1.96 KB
/
GenerateJobSummary.ps1
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
##/***************************************
## Copyright (c) All rights reserved
##
## File: Library_WHQL_ENV_Parsing.ps1
##
## Authors (s)
##
## Mike Cao <[email protected]>
##
## This file is used to run netkvm related test cases automately
##
## This work is licensed under the terms of the GNU GPL,Version 2.
##
##****************************************/
function local:GetScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
. (Join-Path (GetScriptDirectory) "Library_HCK_MachinePoolAPI.ps1" )
. (Join-Path (GetScriptDirectory) "Library_WHQL_ENV_Parsing.ps1" )
$ObjectModel1 = LoadObjectModel "microsoft.windows.Kits.Hardware.objectmodel.dll"
$ObjectModel2 = LoadObjectModel "microsoft.windows.Kits.Hardware.objectmodel.dbconnection.dll"
function GenerateJobSummary
{
GetXMLValues
GetKitValues
$RootPool = $Manager.GetRootMachinePool();
# list all projects, and get the basic status of each
$Manager.GetProjectInfoList() | foreach {
if($_.Name.Contains($GroupName))
{
write-host "Name : " $_.Name
write-host "`tStatus : " $_.Status
write-host "`tNotRun : " $_.NotRunCount.ToString()
write-host "`tPassed : " $_.PassedCount
write-host "`tFailed : " $_.FailedCount
write-host "`tRunning: " $_.RunningCount
$Project = $Manager.GetProject($_.Name)
write-host "`Project Status: " $Project.Info.Status
$Project.GetProductInstances() | foreach {
write-host "Product Instance : " $_.Name
write-host "`Machine pool : " $_.MachinePool.Name
write-host "`OS Platform : " $_.OSPlatform.Description
$_.GetTests() | foreach {
write-host "`t" $_.Name -NoNewline
write-host "`t" $_.Status
}
}
}
}
}
. GenerateJobSummary