Skip to content

Tests fail with Rust 1.77 #137

Closed
@alyssais

Description

@alyssais

With rustc 1.76.0, cargo auditable reports package IDs like this:

lib_and_bin_crate 0.1.0 (path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/lib_and_bin_crate)                      

With rustc 1.77.0, they're like this:

path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/lib_and_bin_crate#0.1.0

This causes the tests to fail:

failures:

---- test_build_then_runtime_dep stdout ----
Test fixture binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/build_then_runtime_dep/top_level_crate#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/build_then_runtime_dep/target/debug/top_level_crate"]}
thread 'test_build_then_runtime_dep' panicked at cargo-auditable/tests/it.rs:327:59:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- test_platform_specific_deps stdout ----
Test fixture binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/platform_specific_deps/with_platform_dep#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/platform_specific_deps/target/debug/with_platform_dep"]}
thread 'test_platform_specific_deps' panicked at cargo-auditable/tests/it.rs:306:50:
called `Option::unwrap()` on a `None` value

---- test_runtime_then_build_dep stdout ----
Test fixture binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/runtime_then_build_dep/top_level_crate#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/runtime_then_build_dep/target/debug/top_level_crate"]}
thread 'test_runtime_then_build_dep' panicked at cargo-auditable/tests/it.rs:351:59:
called `Option::unwrap()` on a `None` value

---- test_custom_rustc_path stdout ----
Test fixture binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/custom_rustc_path/top_level_crate#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/custom_rustc_path/target/debug/top_level_crate"]}
thread 'test_custom_rustc_path' panicked at cargo-auditable/tests/it.rs:377:59:
called `Option::unwrap()` on a `None` value

---- test_bin_and_lib_in_one_crate stdout ----
Test fixture binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/lib_and_bin_crate#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/lib_and_bin_crate/target/debug/some_binary"]}
thread 'test_bin_and_lib_in_one_crate' panicked at cargo-auditable/tests/it.rs:261:64:
called `Option::unwrap()` on a `None` value

---- test_cargo_auditable_workspaces stdout ----
Test fixture binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/workspace/binary_and_cdylib_crate#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/workspace/target/debug/libbinary_and_cdylib_crate.so", "/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/workspace/target/debug/binary_and_cdylib_crate"], "path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/workspace/crate_with_features#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/workspace/target/debug/crate_with_features_bin"]}
thread 'test_cargo_auditable_workspaces' panicked at cargo-auditable/tests/it.rs:145:76:
called `Option::unwrap()` on a `None` value

---- test_build_script stdout ----
Test fixture binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/crate_with_build_script#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/crate_with_build_script/target/debug/crate_with_build_script"]}
thread 'test_build_script' panicked at cargo-auditable/tests/it.rs:283:76:
called `Option::unwrap()` on a `None` value

---- test_self_hosting stdout ----
Self-hosting binary map: {"path+file:///home/qyliss/src/cargo-auditable/rust-audit-info#0.5.2": ["/home/qyliss/src/cargo-auditable/rust-audit-info/target/debug/rust-audit-info"]}
thread 'test_self_hosting' panicked at cargo-auditable/tests/it.rs:221:44:
called `Option::unwrap()` on a `None` value

---- test_lto stdout ----
LTO binary map: {"path+file:///home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/lto_binary_crate#0.1.0": ["/home/qyliss/src/cargo-auditable/cargo-auditable/tests/fixtures/lto_binary_crate/target/release/lto_binary_crate"]}
thread 'test_lto' panicked at cargo-auditable/tests/it.rs:241:62:
called `Option::unwrap()` on a `None` value


failures:
    test_bin_and_lib_in_one_crate
    test_build_script
    test_build_then_runtime_dep
    test_cargo_auditable_workspaces
    test_custom_rustc_path
    test_lto
    test_platform_specific_deps
    test_runtime_then_build_dep
    test_self_hosting

test result: FAILED. 1 passed; 9 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.94s

error: test failed, to rerun pass `-p cargo-auditable --test it`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions