Make Rust-only backend test target explicit
The backend-tests crate is intentionally an integration-test harness, but declaring the target explicitly makes Cargo discovery and review intent unambiguous. The harness comment also records that path-included modules run their own cfg(test) unit tests for hotkey, recorder, and insertion without linking the full Tauri library.\n\nConstraint: Stay within Rust-only backend tests; do not add a Tauri lib/runtime target.\nRejected: Add src/lib.rs just to satisfy target discovery | would introduce an unused crate surface instead of the actual test harness.\nConfidence: high\nScope-risk: narrow\nTested: cargo test --manifest-path openless-all/app/src-tauri/backend-tests/Cargo.toml -- --list | grep -E '^(hotkey|recorder|insertion)::'\nTested: cargo test --manifest-path openless-all/app/src-tauri/backend-tests/Cargo.toml\nTested: git diff --check\nNot-tested: GitHub Windows runner rerun result pending after push.\n\nCo-authored-by: OmX <omx@oh-my-codex.dev>
This commit is contained in:
1 parent
f339209394
commit
02ccac2dd5
2 files changed
+6
No files matched your search
@@ -5,6 +5,10 @@ edition = "2021"
|
||||
rust-version = "1.77"
|
||||
publish = false
|
||||
|
||||
[[test]]
|
||||
name = "backend_rust"
|
||||
path = "tests/backend_rust.rs"
|
||||
|
||||
[dependencies]
|
||||
arboard = "3"
|
||||
cpal = "0.15"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
//!
|
||||
//! 这个测试 crate 只把纯 Rust 后端模块按源码路径编进来,不链接完整 Tauri
|
||||
//! `openless_lib`,避免 Windows CI 在 test harness 启动前被桌面运行时 DLL 拦截。
|
||||
//! Cargo 以 `cfg(test)` 编译这些 path-included 模块,所以各模块自己的
|
||||
//! `#[cfg(test)]` 单测会在这里实际执行(见 hotkey / recorder / insertion)。
|
||||
|
||||
#![allow(dead_code, unused_variables)]
|
||||
|
||||
|
||||
Reference in new issue
Block a user