@@ -36,6 +36,51 @@ function test-vsixcontents() {
36
36
$dest = $shellApp.NameSpace ($target )
37
37
$items = $source.Items ()
38
38
$dest.Copyhere ($items , 20 )
39
+
40
+ $files = gci $target | % { $_.Name }
41
+ if ($files.Count -ne 13 ) {
42
+ write-error " Found $ ( $files.Count ) but expected 13"
43
+ }
44
+
45
+ # The set of important files that are easy to miss
46
+ # - FSharp.Core.dll: We bind to the 4.0 version but 2012 only installs
47
+ # the 4.5 version that we can't bind to
48
+ # - EditorUtils.dll: Not a part of the build but necessary. Make sure
49
+ # that it's found
50
+ $expected =
51
+ " FSharp.Core.dll" ,
52
+ " EditorUtils.dll" ,
53
+ " Vim.Core.dll" ,
54
+ " Vim.UI.Wpf.dll" ,
55
+ " VsVim.Dev10.dll" ,
56
+ " VsVim.Dev11.dll" ,
57
+ " VsVim.dll" ,
58
+ " VsVim.Shared.dll"
59
+
60
+ foreach ($item in $expected ) {
61
+ if (-not ($files -contains $item )) {
62
+ write-error " Didn't found $item in the zip file ($target )"
63
+ }
64
+ }
65
+ }
66
+
67
+ # Run all of the unit tests
68
+ function test-unittests () {
69
+ $all =
70
+ " VimCoreTest\bin\Release\Vim.Core.UnitTest.dll" ,
71
+ " VimWpfTest\bin\Release\Vim.UI.Wpf.UnitTest.dll" ,
72
+ " VsVimSharedTest\bin\Release\VsVim.Shared.UnitTest.dll"
73
+ $xunit = join-path $scriptPath " Tools\xunit.console.clr4.x86.exe"
74
+
75
+ write-host " Running Unit Tests"
76
+ foreach ($file in $all ) {
77
+ $name = split-path - leaf $file
78
+ write-host - NoNewLine (" `t {0}: " -f $name )
79
+ $output = & $xunit $file / silent
80
+ test-return
81
+ $last = $output [$output.Count - 1 ]
82
+ write-host $last
83
+ }
39
84
}
40
85
41
86
function build-clean () {
@@ -68,9 +113,15 @@ if (-not $fast) {
68
113
}
69
114
}
70
115
116
+ # Build all of the relevant projects. Both the deployment binaries and the
117
+ # test infrastructure
118
+ write-host " Building Projects"
119
+ build-release VimCoreTest\VimCoreTest.csproj
120
+ build-release VimWpfTest\VimWpfTest.csproj
121
+ build-release VsVimSharedTest\VsVimSharedTest.csproj
122
+
71
123
# Next step is to build the 2012 components. We need to get the 2010 specific DLL
72
124
# to deploy with the standard install
73
- write-host " Building Projects"
74
125
build-release VsVimSpecific\VsVimDev11.csproj
75
126
76
127
# Copy the 2012 specfic components into the location expected by the build system
@@ -79,6 +130,7 @@ copy VsVimSpecific\bin11\Release\VsVim.Dev11.dll VsVim
79
130
# Now build the final output project
80
131
build-release VsVim\VsVim.csproj
81
132
133
+ write-host " Verifying the Vsix Contents"
82
134
$vsixPath = " VsVim\bin\Release\VsVim.vsix"
83
135
test-vsixcontents $vsixPath
84
-
136
+ test-unittests
0 commit comments