@@ -7,6 +7,8 @@ $commonArgs += @("--x-builtin-ports-root=$PSScriptRoot/../e2e-ports")
7
7
$manifestDirArgs = $commonArgs + @ (" --x-manifest-root=$manifestDir " )
8
8
$noDefaultFeatureArgs = $manifestDirArgs + @ (' --x-no-default-features' )
9
9
10
+ $vcpkgDir = Join-Path - Path $installRoot - ChildPath " vcpkg"
11
+ $manifestInfoPath = Join-Path - Path $vcpkgDir - ChildPath " manifest-info.json"
10
12
function feature {
11
13
@ {
12
14
' description' = ' ' ;
@@ -53,13 +55,18 @@ Throw-IfNotFailed
53
55
Write-Trace " test manifest features: no-default-features, features = []"
54
56
Run- Vcpkg install @manifestDirArgs -- x- no- default- features
55
57
Throw - IfFailed
58
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
59
+
56
60
Write-Trace " test manifest features: default-features, features = [core]"
57
61
Run- Vcpkg install @manifestDirArgs -- x- feature= core
58
62
Throw - IfFailed
63
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
64
+
59
65
# test having both
60
66
Write-Trace " test manifest features: no-default-features, features = [core]"
61
67
Run- Vcpkg install @manifestDirArgs -- x- no- default- features -- x- feature= core
62
68
Throw - IfFailed
69
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
63
70
64
71
Write-Trace " test manifest features: no-default-features, features = [default-fail]"
65
72
Run- Vcpkg install @manifestDirArgs -- x- no- default- features -- x- feature= default - fail
@@ -71,26 +78,38 @@ Throw-IfNotFailed
71
78
Write-Trace " test manifest features: no-default-features, features = [copied-feature]"
72
79
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= copied- feature
73
80
Throw - IfFailed
81
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
82
+
74
83
Write-Trace " test manifest features: no-default-features, features = [copied-feature, copied-feature]"
75
84
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= copied- feature -- x- feature= copied- feature
76
85
Throw - IfFailed
86
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
77
87
78
88
Write-Trace " test manifest features: no-default-features, features = [multiple-dep-1, multiple-dep-2]"
79
89
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= multiple- dep- 1 -- x- feature= multiple- dep- 2
80
90
Throw - IfFailed
91
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
81
92
82
93
Write-Trace " test manifest features: no-default-features, features = [no-default-features-1]"
83
94
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= no- default- features- 1
84
95
Throw - IfFailed
96
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
97
+
85
98
Write-Trace " test manifest features: no-default-features, features = [no-default-features-2]"
86
99
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= no- default- features- 2
87
100
Throw - IfFailed
101
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
102
+
88
103
Write-Trace " test manifest features: no-default-features, features = [no-default-features-1,no-default-features-3]"
89
104
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= no- default- features- 1 -- x- feature= no- default- features- 3
90
105
Throw - IfFailed
106
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
107
+
91
108
Write-Trace " test manifest features: no-default-features, features = [no-default-features-3]"
92
109
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= no- default- features- 3
93
110
Throw - IfFailed
111
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
112
+
94
113
95
114
$vcpkgJson = @ {
96
115
' default-features' = @ ( ' default-fail' );
@@ -122,38 +141,51 @@ Throw-IfNotFailed
122
141
Write-Trace " test nameless manifest features: no-default-features, features = []"
123
142
Run- Vcpkg install @manifestDirArgs -- x- no- default- features
124
143
Throw - IfFailed
144
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
145
+
125
146
Write-Trace " test nameless manifest features: default-features, features = [core]"
126
147
Run- Vcpkg install @manifestDirArgs -- x- feature= core
127
148
Throw - IfFailed
149
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
150
+
128
151
# test having both
129
152
Write-Trace " test nameless manifest features: no-default-features, features = [core]"
130
153
Run- Vcpkg install @manifestDirArgs -- x- no- default- features -- x- feature= core
131
154
Throw - IfFailed
155
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
132
156
133
157
Write-Trace " test nameless manifest features: no-default-features, features = [default-fail]"
134
158
Run- Vcpkg install @manifestDirArgs -- x- no- default- features -- x- feature= default - fail
135
159
Throw - IfNotFailed
160
+
136
161
Write-Trace " test nameless manifest features: default-features, features = [core, default-fail]"
137
162
Run- Vcpkg install @manifestDirArgs -- x- feature= core -- x- feature= default - fail
138
163
Throw - IfNotFailed
139
164
140
165
Write-Trace " test nameless manifest features: no-default-features, features = [copied-feature]"
141
166
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= copied- feature
142
167
Throw - IfFailed
168
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
169
+
143
170
Write-Trace " test nameless manifest features: no-default-features, features = [copied-feature, copied-feature]"
144
171
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= copied- feature -- x- feature= copied- feature
145
172
Throw - IfFailed
173
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
146
174
147
175
Write-Trace " test nameless manifest features: no-default-features, features = [multiple-dep-1, multiple-dep-2]"
148
176
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= multiple- dep- 1 -- x- feature= multiple- dep- 2
149
177
Throw - IfFailed
178
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
150
179
151
180
Write-Trace " test nameless manifest features: no-default-features, features = [no-default-features-1]"
152
181
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= no- default- features- 1
153
182
Throw - IfFailed
183
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
184
+
154
185
Write-Trace " test nameless manifest features: no-default-features, features = [no-default-features-2]"
155
186
Run- Vcpkg install @noDefaultFeatureArgs -- x- feature= no- default- features- 2
156
187
Throw - IfFailed
188
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
157
189
158
190
$vcpkgJson = @ {
159
191
' name' = " manifest-test" ;
@@ -181,10 +213,12 @@ Set-Content -Path "$manifestDir/manifest-test/vcpkg.json" `
181
213
Write-Trace " test manifest features: self-reference, features = [a]"
182
214
Run- Vcpkg install @manifestDirArgs -- x- feature= a
183
215
Throw - IfFailed
216
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
184
217
185
218
Write-Trace " test manifest features: self-reference, features = [a], with overlay"
186
219
Run- Vcpkg install @manifestDirArgs -- x- feature= a " --overlay-ports=$manifestDir /manifest-test"
187
220
Throw - IfFailed
221
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
188
222
189
223
Write-Trace " test manifest install with specific package names fails"
190
224
$output = Run- VcpkgAndCaptureOutput install @manifestDirArgs vcpkg- empty- port
@@ -194,6 +228,8 @@ Throw-IfNonContains -Expected 'error: In manifest mode, `vcpkg install` does not
194
228
Write-Trace " test manifest install with specific package names forced to classic mode succeeds"
195
229
$output = Run- VcpkgAndCaptureOutput install @manifestDirArgs -- classic vcpkg- empty- port
196
230
Throw - IfFailed
231
+ Test-ManifestInfo - ManifestInfoPath $ManifestInfoPath - VcpkgDir $vcpkgDir - ManifestRoot $manifestDir
232
+
197
233
$expected = @"
198
234
The following packages will be built and installed:
199
235
vcpkg-empty-port:
0 commit comments