Skip to content

Restructure integration tests #951

Closed

Description

@ludfjig

We currently have 2 different integration test files: integration_test.rs and sandbox_host_test.rs. The difference between these is unclear.

Certain integration tests are tested against both two types of guests (c and rust) by using new_uninit helper function, which will return either rust/c guests depending on an environment variable. We should consolidate all integration tests that need to run against both rust and c guests into its own separate file. Additionally, we should not depend on environment variables for testing, and instead using something like this (just an example)

#[test]
fn some_test() {
    with_c_or_rust_sandbox(|sandbox: MultiUseSandbox| {
        /// test logic here
    });
}

Where with_c_or_rust_sandbox will run twice, one with c guest and one with rust guests.

The rest of the integration tests (that only exercises rust or only exercises c) can live in a separate files.

In addition, running just test will right now run the same WIT tests twice, because it's ran with both GUEST=c and GUEST=rust, even though it of course only uses the rust guests. This is slow and unnecessary.

Activity

  1. added
    lifecycle/confirmedBug is verified or proposal seems reasonable
    and removed on Oct 22, 2025
  2. vineetpuranik commented on Oct 30, 2025

    @vineetpuranik

    Discussed with @ludfjig and @jsturtevant on slack. Here is the summary of what will be done to take care of this issue :

  3. added this to the Backlog milestone on Nov 19, 2025
  4. ludfjig commented on Mar 16, 2026

    @ludfjig
    ContributorAuthor

    Addressed in #1196

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions