Skip to content

Tests fail for target wasm32-wasi #273

Open

Description

@Spoonbender

Running cargo build --target wasm32-wasi succeeds, but cargo wasi test fails:

Activity

  1. Spoonbender commented on Feb 1, 2021

    @Spoonbender
    Author

    Just to elaborate on the 2nd case:
    According to Testing in WASI, "The wasm32-wasi target for Rust is effectively a panic=abort target which has no support for unwinding". This means that the AssertUnwindSafe function used in tester.rs can't actually perform its duty for this target (or any other panic=abort target).
    Additionally, when running cargo wasi test, all tests decorated #[should_panic] are ignored.

    This means we need to decide how we'd like quickcheck to behave in case of wasi or any other target that doesn't support unwinding.
    The std::panic::set_hook function might be helpful here, as it allows setting a hook that runs on both unwinding and aborting targets.

    Adding support for aborting targets, however, could be considered a completely new feature for quicktest - and for the time being we might just ensure tests pass for wasi w/o adding this support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions