@@ -388,7 +388,7 @@ commands:
388
388
# PIC version of libSDL which is used by test_sdl2_misc_main_module
389
389
export EM_FROZEN_CACHE=""
390
390
echo "-----"
391
- echo "Running browser tests"
391
+ echo "Running browser tests (EMTEST_BROWSER=$EMTEST_BROWSER) "
392
392
echo "-----"
393
393
test/runner << parameters.test_targets >>
394
394
# posix and emrun suites are disabled because firefox errors on
@@ -425,15 +425,19 @@ commands:
425
425
Invoke-WebRequest -Uri $nightlyUrl -OutFile $outZip
426
426
427
427
# Extract to user home directory
428
+ Write-Host "Extracing $outZip"
428
429
$installDir = Join-Path $env:USERPROFILE "firefox"
429
430
if (Test-Path $installDir) { Remove-Item -Recurse -Force $installDir }
430
- Expand-Archive -LiteralPath $outZip -DestinationPath $installDir
431
+ # All files in the archive are in the firefox/ directory so extract
432
+ # directly to $USERPROFILE.
433
+ Expand-Archive -LiteralPath $outZip -DestinationPath $env:USERPROFILE
431
434
432
- # Set environment variable for tests
433
- $ffExe = Join-Path $installDir "firefox.exe"
434
- [System.Environment]::SetEnvironmentVariable("EMTEST_BROWSER", $ffExe, "User")
435
- $env:EMTEST_BROWSER = $ffExe
436
- Write-Host "EMTEST_BROWSER set to $env:EMTEST_BROWSER"
435
+ # FIXME(sbc): This does not seem to work, and EMTEST_BROWSER is
436
+ # not set in the bash job below.
437
+ # Set environment variable that will be visibvle in future steps
438
+ #$ffExe = Join-Path $installDir "firefox.exe"
439
+ #Write-Host "Setting EMTEST_BROWSER to '$ffExe' in $env:BASH_ENV"
440
+ #Add-Content -Path $env:BASH_ENV -Value "export EMTEST_BROWSER='$ffExe'"
437
441
- run :
438
442
name : run tests (<< parameters.title >>)
439
443
environment :
@@ -448,12 +452,20 @@ commands:
448
452
EMTEST_CORES : " 2"
449
453
DISPLAY : " :0"
450
454
command : |
455
+ # For some reason its not possible for the powershell job above to
456
+ # add to BASH_ENV, so we need set this here
457
+ export EMTEST_BROWSER="$USERPROFILE\\firefox\\firefox.exe"
458
+
451
459
# There are tests in the browser test suite that using libraries
452
460
# that are not included by "./embuilder build ALL". For example the
453
461
# PIC version of libSDL which is used by test_sdl2_misc_main_module
454
- set EM_FROZEN_CACHE=
462
+ export EM_FROZEN_CACHE=
463
+
464
+ echo "BASH_ENV($BASH_ENV):"
465
+ echo "-----"
466
+ cat $BASH_ENV
455
467
echo "-----"
456
- echo "Running browser tests"
468
+ echo "Running browser tests (EMTEST_BROWSER=$EMTEST_BROWSER) "
457
469
echo "-----"
458
470
test/runner << parameters.test_targets >>
459
471
- upload-test-results
@@ -1072,6 +1084,44 @@ jobs:
1072
1084
browser64.test_sdl_image
1073
1085
browser64.test_dylink_many
1074
1086
"
1087
+ test-windows-browser-firefox :
1088
+ # Use spaces and other special chars in the path to emsdk to flush out
1089
+ # issues with windows. In particular, the .bat file launchers can have
1090
+ # trouble with these.
1091
+ working_directory : " ~/path with spaces ()/"
1092
+ executor :
1093
+ name : win/server-2019
1094
+ shell : bash.exe -eo pipefail
1095
+ environment :
1096
+ PYTHONUNBUFFERED : " 1"
1097
+ EMSDK_NOTTY : " 1"
1098
+ steps :
1099
+ - checkout
1100
+ - run :
1101
+ name : Install packages
1102
+ command : |
1103
+ choco install -y cmake.portable ninja pkgconfiglite
1104
+ - run :
1105
+ name : Add python to bash path
1106
+ command : echo "export PATH=\"$PATH:/c/Python27amd64/\"" >> $BASH_ENV
1107
+ - install-emsdk
1108
+ - pip-install :
1109
+ python : " $EMSDK_PYTHON"
1110
+ - run-tests-firefox-windows :
1111
+ title : " browser on firefox on windows"
1112
+ # skip browser.test_glbook, as it requires mingw32-make, which is not
1113
+ # installed on CircleCI.
1114
+ # skip browser.test_sdl2_mixer_wav_dash_l, fails to build on Windows
1115
+ # on CircleCI (works locally)
1116
+ #
1117
+ # For now, just run a small subset of tests that are know to work.
1118
+ # TODO: Include more tests here.
1119
+ test_targets : "
1120
+ browser.test_sdl_image
1121
+ browser.test_dylink_many
1122
+ skip:browser.test_glbook
1123
+ skip:browser.test_sdl2_mixer_wav_dash_l
1124
+ "
1075
1125
# TODO(sbc): Re-enable once we figure out why the emrun tests are
1076
1126
# locking up.
1077
1127
# test-browser-chrome-emrun:
@@ -1083,6 +1133,7 @@ jobs:
1083
1133
executor : focal
1084
1134
steps :
1085
1135
- test-sockets-chrome
1136
+
1086
1137
# windows and mac do not have separate build and test jobs, as they only run
1087
1138
# a limited set of tests; it is simpler and faster to do it all in one job.
1088
1139
test-windows :
@@ -1129,19 +1180,6 @@ jobs:
1129
1180
title : " sockets.test_nodejs_sockets_echo*"
1130
1181
test_targets : " sockets.test_nodejs_sockets_echo*"
1131
1182
- upload-test-results
1132
- # Run browser tests as well.
1133
- - run-tests-firefox-windows :
1134
- title : " browser on firefox on windows"
1135
- # skip browser.test_glbook, as it requires mingw32-make, which is not
1136
- # installed on CircleCI.
1137
- # skip browser.test_sdl2_mixer_wav_dash_l, fails to build on Windows
1138
- # on CircleCI (works locally)
1139
- test_targets : "
1140
- browser
1141
- skip:browser.test_glbook
1142
- skip:browser.test_sdl2_mixer_wav_dash_l
1143
- "
1144
- - upload-test-results
1145
1183
1146
1184
test-mac-arm64 :
1147
1185
executor : mac-arm64
@@ -1229,6 +1267,7 @@ workflows:
1229
1267
- test-spidermonkey
1230
1268
- test-node-compat
1231
1269
- test-windows
1270
+ - test-windows-browser-firefox
1232
1271
- test-mac-arm64 :
1233
1272
requires :
1234
1273
- build-linux
0 commit comments