11
11
12
12
<!-- disable by default on unsupported platforms -->
13
13
<InstallChromeForTests Condition =" '$(InstallChromeForTests)' == '' and '$(ChromeOSIdentifier)' == ''" >false</InstallChromeForTests >
14
+ <InstallFirefoxForTests Condition =" '$(InstallFirefoxForTests)' == '' and '$(ChromeOSIdentifier)' == ''" >false</InstallFirefoxForTests >
14
15
<InstallV8ForTests Condition =" '$(InstallV8ForTests)' == ''" >false</InstallV8ForTests >
15
16
16
- <FirefoxDir >$(ArtifactsBinDir)firefox\</FirefoxDir >
17
- <FirefoxStampFile >$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))</FirefoxStampFile >
18
17
<_BrowserStampDir >$(ArtifactsBinDir)\</_BrowserStampDir >
19
18
20
19
<WasmProvisionAfterTarget Condition =" '$(WasmProvisionAfterTarget)' == ''" >Build</WasmProvisionAfterTarget >
23
22
<Import Project =" $(MSBuildThisFileDirectory)ChromeVersions.props" />
24
23
25
24
<PropertyGroup Condition =" '$(BrowserHost)' != 'windows'" >
26
- <FirefoxRevision >108.0.1</ FirefoxRevision >
27
- <FirefoxUrl >https://ftp. mozilla.org/pub/firefox/ releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision) .tar.bz2</ FirefoxUrl >
25
+ <FirefoxUrl >https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</ FirefoxUrl >
26
+ <GeckoDriverUrl >https://github.com/ mozilla/geckodriver/ releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64 .tar.gz</ GeckoDriverUrl >
28
27
<FirefoxBinaryName >firefox</FirefoxBinaryName >
28
+ <GeckoDriverBinaryName >geckodriver</GeckoDriverBinaryName >
29
+ <FirefoxDir >$(ArtifactsBinDir)firefox\</FirefoxDir >
30
+ <FirefoxDirName >firefox</FirefoxDirName >
31
+ <GeckoDriverDirName >geckodriver</GeckoDriverDirName >
32
+ <GeckoDriverDir >$(ArtifactsBinDir)geckodriver\</GeckoDriverDir >
33
+ <FirefoxStampFile >$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(linux_FirefoxRevision).stamp'))</FirefoxStampFile >
34
+ <GeckoDriverStampFile >$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(linux_GeckoDriverRevision).stamp'))</GeckoDriverStampFile >
35
+
36
+ <FirefoxBinaryPath >$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxDirName), $(FirefoxBinaryName)))</FirefoxBinaryPath >
37
+ <GeckoDriverBinaryPath >$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverDirName), $(GeckoDriverBinaryName)))</GeckoDriverBinaryPath >
29
38
</PropertyGroup >
30
39
31
40
<PropertyGroup Condition =" $([MSBuild]::IsOSPlatform('linux'))" >
84
93
<V8BinaryPath >$([MSBuild]::NormalizePath($(V8Dir), $(V8BinaryName)))</V8BinaryPath >
85
94
</PropertyGroup >
86
95
87
- <PropertyGroup Condition =" '$(BrowserHost)' != 'windows'" >
88
- <FirefoxRevision >108.0.1</FirefoxRevision >
89
- <FirefoxUrl >https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl >
90
- <FirefoxBinaryName >firefox</FirefoxBinaryName >
91
- </PropertyGroup >
92
-
93
96
<Target Name =" DownloadAndInstallChrome"
94
97
AfterTargets =" $(WasmProvisionAfterTarget)"
95
98
Condition =" (!Exists($(ChromeStampFile)) or !Exists($(ChromeBinaryPath))) and '$(InstallChromeForTests)' == 'true'" >
@@ -188,6 +191,9 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
188
191
<Delete Files =" @(_StampFile)" />
189
192
<RemoveDir Directories =" $(FirefoxDir)" />
190
193
194
+ <Message Text =" ** Installing firefox version $(FirefoxRevision), to: $(FirefoxDir). To disable this set the msuild property InstallFirefoxForTests=false ."
195
+ Importance =" High" />
196
+
191
197
<DownloadFile SourceUrl =" $(FirefoxUrl)" DestinationFolder =" $(FirefoxDir)" SkipUnchangedFiles =" true" >
192
198
<Output TaskParameter =" DownloadedFile" PropertyName =" _DownloadedFile" />
193
199
</DownloadFile >
@@ -205,4 +211,36 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
205
211
206
212
<Touch Files =" $(FirefoxStampFile)" AlwaysCreate =" true" />
207
213
</Target >
214
+
215
+ <Target Name =" DownloadAndInstallGeckoDriver"
216
+ AfterTargets =" $(WasmProvisionAfterTarget)"
217
+ Condition =" !Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows'))" >
218
+ <ItemGroup >
219
+ <_StampFile Include =" $(_BrowserStampDir).install-geckodriver*.stamp" />
220
+ </ItemGroup >
221
+
222
+ <Delete Files =" @(_StampFile)" />
223
+ <RemoveDir Directories =" $(GeckoDriverDir)" />
224
+
225
+ <Message Text =" ** Installing GeckoDriver version $(GeckoDriverRevision), to: $(GeckoDriverDir)/$(GeckoDriverDirName). To disable this set the msuild property InstallFirefoxForTests=false ."
226
+ Importance =" High" />
227
+
228
+ <DownloadFile SourceUrl =" $(GeckoDriverUrl)" DestinationFolder =" $(GeckoDriverDir)" SkipUnchangedFiles =" true" >
229
+ <Output TaskParameter =" DownloadedFile" PropertyName =" _DownloadedFile" />
230
+ </DownloadFile >
231
+ <Exec Command =" mkdir -p $(GeckoDriverDir)/$(GeckoDriverDirName)" />
232
+ <Exec Command =" tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)/$(GeckoDriverDirName)" />
233
+ <Exec Command =" rm -rf $(_DownloadedFile)" />
234
+
235
+ <PropertyGroup >
236
+ <_GeckoDriverBinaryPath >$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverBinaryName)))</_GeckoDriverBinaryPath >
237
+ </PropertyGroup >
238
+
239
+ <Error Text =" Cannot find GeckoDriver at $(_GeckoDriverBinaryPath) in the downloaded copy"
240
+ Condition =" !Exists($(_GeckoDriverBinaryPath))" />
241
+
242
+ <Exec Command =" chmod +x $(_GeckoDriverBinaryPath)" />
243
+
244
+ <Touch Files =" $(GeckoDriverStampFile)" AlwaysCreate =" true" />
245
+ </Target >
208
246
</Project >
0 commit comments