-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.ps1
68 lines (48 loc) · 1.93 KB
/
Test.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
$global:__testing = $true
$VerbosePreference = "Continue"
Import-Module "PackageManagement"
Write-Host "[Import-Package:Testing] Begin Testing?"
pause;
Measure-Command {
Import-Module "$Root\Import-Package\"
}
Write-Host "[Import-Package:Testing] Initialized. Continue Testing?"
pause;
# --- Basic Testing ---
Measure-Command {
Write-Host "[Import-Package:Testing] Testing with Avalonia.Desktop and Microsoft.ClearScript"
Import-Package Avalonia.Desktop -Offline
Import-Package Microsoft.ClearScript -Offline
}
Write-Host "[Import-Package:Testing] Avalonia.Desktop and Microsoft.ClearScript should be loaded. Continue Testing?"
pause;
# --- Path Parameter Testing ---
Write-Host "[Import-Package:Testing] Testing the Unmanaged Parameterset"
$unmanaged = @{}
# Has no dependencies
$unmanaged.Simple = Get-Package NewtonSoft.json
# Has 1 dependency
$unmanaged.Complex = Get-Package NLua
$unmanaged.Simple = $unmanaged.Simple.Source
$unmanaged.Complex = $unmanaged.Complex.Source
Measure-Command { Import-Package -Path $unmanaged.Simple }
Write-Host "[Import-Package:Testing] Testing the Unmanaged Parameterset with a simplistic package is complete. Continue Testing?"
pause;
Measure-Command { Import-Package -Path $unmanaged.Complex }
Write-Host "[Import-Package:Testing] Testing the Unmanaged Parameterset with a complex package is complete. Continue Testing?"
pause;
Measure-Command { Import-Package NLua -SkipDependencies }
Write-Host "[Import-Package:Testing] Testing the -SkipDependencies switch is complete. Continue Testing?"
pause;
Measure-Command { Import-Package IronRuby.Libraries }
Write-Host "[Import-Package:Testing] Testing the Semver2 packages (and the package cache) is complete. Continue Testing?"
pause;
@(
[Microsoft.ClearScript.V8.V8ScriptEngine]
[Avalonia.Application]
[Newtonsoft.Json.JsonConverter]
[NLua.Lua]
[IronRuby.Ruby]
) | Format-Table
Write-Host
Write-Host "System Runtime ID:" (Get-Runtime)