Support git init and clone in wasm tests #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This extends to wasm tests to include
git init(lots of filesystem access) andgit clone(https requests from github via a CORS proxy). The tests covered now aretest_clone.py,test_git.py,test_init.pyand the newtest_fixtures.pywhich tests the new fixtures and mocks that are defined inconftest_wasm.pyto run test code in the browser rather than in python on the local file system.By default such testing now uses the latest
mainbranch ofcocklerather than the latest release. There are two newcmakeoptions:USE_RECIPE_PATCHES: Use patches from emscripten-forge recipe or not, default isONUSE_COCKLE_RELEASE: Use latest cockle release rather than repo main branch, default isOFFThe testing framework now serves it own CORS proxy using cors-anywhere to avoid using a free public CORS proxy which can be rate limited or otherwise restricted or unreliable.
This is now using emscripten 4.x builds. All the important information on how to use this is in the
wasm/README.mdfile and it should be easily runable on any linux or macos system.Future work in separate PRs:
test_*.pyfiles. Some of this will hopefully be quite easy, some not.