You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Karma firefox test failing with Cannot find module 'Firefox.app/Contents/MacOS/firefox' #296
After the last update of rules_webtesting in rules_typescript, ts_web_test_suite targets that test against the @io_bazel_rules_webtesting//browsers:firefox-local browser fail with Cannot find module 'Firefox.app/Contents/MacOS/firefox'.
This is true for OSX at least. I haven't checked if it fails on Linux or Windows.
If both firefox and chrome tests are commented out for linux/osx, does that mean that ts_web_test is not being tested there at all? I think those are the only browsers that are available.
but for Firefox it now provides an archiveFile and the path for firefox that is provided is for the archive contents. This change is what broke the firefox tests.
There is a io_bazel_rules_webtesting/web/internal/extract.sh file in the runfiles for the firefox test which isn't in the chromium runfiles. Its also listed in namedFiles under EXTRACT_EXE. It looks like the test runner meant to run extract.sh on the firefox archive now.
Running an sh file from within node won't work on Windows. Perhaps using a native node zip extractor such as extract-zip for this is the best solution.
Extracting the firefox archive and providing a final path for the executable sounds like that kind of thing that should be happening inside rules_webtesting. I don't think we should be trying to extract internal rules_webtesting downloaded archives and processing their files.
So it looks like this rules_webtesting added a feature where a web_test_archive can be extracted at either build time or runtime: bazelbuild/rules_webtesting#222.
Later a comment got added that Firefox needs to be in a writeable directory (I assume that means that it must be extracted in the runfiles directory when the test runs):
web_test_archive(
name = "firefox",
archive = "@org_mozilla_firefox//file",
# Firefox needs to be in a writable directory.
extract = "run",
doc = """Specifies an archive file with named files in it.
If extract=="run", then the archive will only be extracted if WTL wants one
of the named files in it.""",
The extract is handled automatically by the .go code but in our case we may have to handle it ourselves.
Activity
alexeagle commentedon Oct 4, 2018
Fails on Linux too.
filipesilva commentedon Oct 5, 2018
Does this happen only on local machines? CI seems to be green.
gregmagolan commentedon Oct 5, 2018
The firefox tests have been commented out on CI
filipesilva commentedon Oct 5, 2018
Oh that's right. On the Windows CI they seem to be running though: https://github.com/bazelbuild/rules_typescript/blob/master/.bazelci/presubmit.yml
If both firefox and chrome tests are commented out for linux/osx, does that mean that
ts_web_testis not being tested there at all? I think those are the only browsers that are available.gregmagolan commentedon Oct 5, 2018
Chrome is still tested in CircleCI linux at least. But yes, I think we need to get more testing up for these.
gregmagolan commentedon Oct 11, 2018
A little more information on this. rules_webtesting provides a path to the chromium executable in the test environment:
but for Firefox it now provides an
archiveFileand the path for firefox that is provided is for the archive contents. This change is what broke the firefox tests.There is a
io_bazel_rules_webtesting/web/internal/extract.shfile in the runfiles for the firefox test which isn't in the chromium runfiles. Its also listed innamedFilesunderEXTRACT_EXE. It looks like the test runner meant to run extract.sh on the firefox archive now.gregmagolan commentedon Oct 11, 2018
Running an
shfile from within node won't work on Windows. Perhaps using a native node zip extractor such asextract-zipfor this is the best solution.gregmagolan commentedon Oct 11, 2018
@alexeagle @filipesilva Thoughts?
filipesilva commentedon Oct 12, 2018
Extracting the firefox archive and providing a final path for the executable sounds like that kind of thing that should be happening inside
rules_webtesting. I don't think we should be trying to extract internalrules_webtestingdownloaded archives and processing their files.gregmagolan commentedon Oct 12, 2018
So it looks like this rules_webtesting added a feature where a
web_test_archivecan be extracted at either build time or runtime: bazelbuild/rules_webtesting#222.And firefox was change to be extracted at
runhere: bazelbuild/rules_webtesting#293Later a comment got added that Firefox needs to be in a writeable directory (I assume that means that it must be extracted in the runfiles directory when the test runs):
gregmagolan commentedon Oct 12, 2018
Some more context:
The extract is handled automatically by the .go code but in our case we may have to handle it ourselves.
gregmagolan commentedon Dec 11, 2018
Fixed with #299
test: re-enable firefox ts_web_test_suite tests now that bazelbuild/r…