Skip to content

[bug] Follow-up: cargo test still fails on Windows #14723

@aoxiangtianyu-go

Description

@aoxiangtianyu-go

Describe the bug

This is a follow-up to #14719.

Although #14720 has been merged and resolved part of the original problem, tests are still failing locally under the same setup.

I wanted to open a separate issue to track the remaining failure, since the original issue was closed automatically when the PR was merged.

I'm happy to provide more details and logs if needed.

  • System Name: Windows
  • System Version: Windows 11 Home China
  • System kernel Version: 26100
  • System Arch: x86_64
  • Is Admin: false
  • Rust toolchain: rustc 1.91.1 (ed61e7d7e 2025-11-07)
  • Repository: fresh clone from GitHub

There are two test failures observed locally:

  • resources::tests::resource_paths_errors fails intermittently (sometimes passes, sometimes fails) under the same setup.

---- resources::tests::resource_paths_errors stdout ----

thread 'resources::tests::resource_paths_errors' (21232) panicked at crates\tauri-utils\src\resources.rs:587:5:
assertion `left == right` failed
  left: 5
 right: 4
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Backtrace
---- resources::tests::resource_paths_errors stdout ----

thread 'resources::tests::resource_paths_errors' (24668) panicked at crates\tauri-utils\src\resources.rs:587:5:
assertion `left == right` failed
  left: 5
 right: 4
stack backtrace:
   0: std::panicking::panic_handler
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\panicking.rs:698
   1: core::panicking::panic_fmt
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\core\src\panicking.rs:75
   2: core::panicking::assert_failed_inner
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\core\src\panicking.rs:434
   3: core::panicking::assert_failed<usize,usize>
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\core\src\panicking.rs:394
   4: tauri_utils::resources::tests::resource_paths_errors::closure$0
             at D:\Code\tauri\crates\tauri-utils\src\resources.rs:587
   5: core::ops::function::FnOnce::call_once<tauri_utils::resources::tests::resource_paths_errors::closure_env$0,tuple$<> >
             at C:\Users\lenovo\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
   6: serial_test::serial_code_lock::local_serial_core
             at C:\Users\lenovo\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\serial_test-3.2.0\src\serial_code_lock.rs:36
   7: tauri_utils::resources::tests::resource_paths_errors
             at D:\Code\tauri\crates\tauri-utils\src\resources.rs:564
   8: tauri_utils::resources::tests::resource_paths_errors::closure$0
             at D:\Code\tauri\crates\tauri-utils\src\resources.rs:565
   9: core::ops::function::FnOnce::call_once<tauri_utils::resources::tests::resource_paths_errors::closure_env$0,tuple$<> >
             at C:\Users\lenovo\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
  10: core::ops::function::FnOnce::call_once
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    resources::tests::resource_paths_errors

  • resources::tests::resource_paths_iter_slice_allow_walk is consistently reproducible.

---- resources::tests::resource_paths_iter_slice_allow_walk stdout ----

thread 'resources::tests::resource_paths_iter_slice_allow_walk' (36380) panicked at crates\tauri-utils\src\resources.rs:424:9:
Resource { path: "..\\src\\textures\\ground\\earth.tex", target: "_up_\\src\\textures\\earth.tex" } was expected but not found in [Resource { path: "..\\src\\script.js", target: "_up_\\src\\script.js" }, Resource { path: "..\\src\\assets\\javascript.svg", target: "_up_\\src\\assets\\javascript.svg" }, Resource { path: "..\\src\\assets\\lang\\ar.json", target: "_up_\\src\\assets\\lang\\ar.json" }, Resource { path: "..\\src\\assets\\lang\\en.json", target: "_up_\\src\\assets\\lang\\en.json" }, Resource { path: "..\\src\\assets\\rust.svg", target: "_up_\\src\\assets\\rust.svg" }, Resource { path: "..\\src\\assets\\tauri.svg", target: "_up_\\src\\assets\\tauri.svg" }, Resource { path: "..\\src\\index.html", target: "_up_\\src\\index.html" }, Resource { path: "..\\src\\sounds\\lang\\es.wav", target: "_up_\\src\\sounds\\lang\\es.wav" }, Resource { path: "..\\src\\sounds\\lang\\fr.wav", target: "_up_\\src\\sounds\\lang\\fr.wav" }, Resource { path: "..\\src\\textures\\fire.tex", target: "_up_\\src\\textures\\fire.tex" }, Resource { path: "..\\src\\textures\\ground\\earth.tex", target: "_up_\\src\\textures\\ground\\earth.tex" }, Resource { path: "..\\src\\textures\\ground\\sand.tex", target: "_up_\\src\\textures\\ground\\sand.tex" }, Resource { path: "..\\src\\textures\\water.tex", target: "_up_\\src\\textures\\water.tex" }, Resource { path: "Cargo.toml", target: "Cargo.toml" }, Resource { path: "Tauri.toml", target: "Tauri.toml" }, Resource { path: "tauri.conf.json", target: "tauri.conf.json" }]

Backtrace

stack backtrace:
   0: std::panicking::panic_handler
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\panicking.rs:698
   1: core::panicking::panic_fmt
            -at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\core\src\panicking.rs:75
   2: tauri_utils::resources::tests::resource_paths_iter_slice_allow_walk::closure$0
             at D:\Code\tauri\crates\tauri-utils\src\resources.rs:424
   3: core::ops::function::FnOnce::call_once<tauri_utils::resources::tests::resource_paths_iter_slice_allow_walk::closure_env$0,tuple$<> >
             at C:\Users\lenovo\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
  4: serial_test::serial_code_lock::local_serial_core
           at C:\Users\lenovo\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\serial_test-3.2.0\src\serial_code_lock.rs:36
5: tauri_utils::resources::tests::resource_paths_iter_slice_allow_walk
            at D:\Code\tauri\crates\tauri-utils\src\resources.rs:362
   6: tauri_utils::resources::tests::resource_paths_iter_slice_allow_walk::closure$0
             at D:\Code\tauri\crates\tauri-utils\src\resources.rs:363
   7: core::ops::function::FnOnce::call_once<tauri_utils::resources::tests::resource_paths_iter_slice_allow_walk::closure_env$0,tuple$<> >
             at C:\Users\lenovo\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
   8: core::ops::function::FnOnce::call_once
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Reproduction

git clone https://github.com/tauri-apps/tauri.git
cargo test

Expected behavior

No response

Full tauri info output

This issue is about running `cargo test` in the repository itself,
not about a Tauri application project.

Stack trace


Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions