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
Almost all of the tests in the wasmer-integration-tests-cli test suite are non-hygienic. They all use the same ~/.wasmer/ directory, which means that
Integration tests need to be run sequentially (i.e. --test-threads=1) and a failure midway through can sometimes mess things up for subsequent tests (I've noticed caching is particularly bad for this)
After the integration tests are done, the global ~/.wasmer/wasmer.toml file will be left in a broken state and you'll need to find your old access token and log in again
Proposed solution
The way we solve this problem is by making sure each integration test uses its own independent wasmer directory. We can do this fairly trivially by setting the $WASMER_DIR environment variable to something unique like $CARGO_TARGET_TMPDIR/wasmer-integration-tests-cli/$test_name
Cargo always sets provides integration tests with a $CARGO_TARGET_TMPDIR directory inside target/ they can use as a scratch space. That also means CI will get caching for free.
The text was updated successfully, but these errors were encountered:
Motivation
Almost all of the tests in the
wasmer-integration-tests-cli
test suite are non-hygienic. They all use the same~/.wasmer/
directory, which means that--test-threads=1
) and a failure midway through can sometimes mess things up for subsequent tests (I've noticed caching is particularly bad for this)~/.wasmer/wasmer.toml
file will be left in a broken state and you'll need to find your old access token and log in againProposed solution
The way we solve this problem is by making sure each integration test uses its own independent wasmer directory. We can do this fairly trivially by setting the
$WASMER_DIR
environment variable to something unique like$CARGO_TARGET_TMPDIR/wasmer-integration-tests-cli/$test_name
Cargo always sets provides integration tests with a
$CARGO_TARGET_TMPDIR
directory insidetarget/
they can use as a scratch space. That also means CI will get caching for free.The text was updated successfully, but these errors were encountered: