返回 CodeWhale
main.rs
根目录 / crates / tui / tests / integration / main.rs
1 //! Consolidated harness for plain `#[test]`/`#[tokio::test]` acceptance suites.
2 //!
3 //! See `crates/tui/tests/README.md` for why this exists: 17 small integration
4 //! binaries each re-linked the full `codewhale-tui` graph — one harness keeps the
5 //! same test names (`integration::adaptive_evidence_acceptance::...`) so
6 //! `cargo test -p codewhale-tui adaptive_evidence_acceptance` still filters.
7
8 #[path = "../support/binary.rs"]
9 mod binary;
10
11 // Production modules that are `#[path]`-included by the test files below and
12 // that themselves use `crate::`. They must exist at the harness crate root so
13 // `crate::config`, `crate::shell_dispatcher`, etc. resolve when the same
14 // files are compiled as `crate::integration::<test>::<module>`.
15
16 #[path = "../../src/config/home.rs"]
17 #[allow(dead_code)]
18 mod config;
19 #[path = "../../src/eval.rs"]
20 mod eval;
21 #[path = "../../src/skills/frontmatter.rs"]
22 mod frontmatter;
23 #[path = "../../src/skills/install.rs"]
24 #[allow(dead_code)]
25 mod install;
26 #[path = "../support/llm_client.rs"]
27 mod llm_client;
28 #[path = "../../src/network_policy.rs"]
29 mod network_policy;
30 /// `skills/install.rs` reads downloads through `crate::utils`; only the
31 /// capped body reader is needed, so only that file is included.
32 #[path = "../../src/utils/response_body.rs"]
33 mod utils;
34 /// `network_policy.rs` resolves its audit file through `crate::audit`. The
35 /// harness has no audit module, so it gets a per-process scratch log: like the
36 /// production cfg(test) path (#6534), a test never appends to the real
37 /// `~/.codewhale/audit.log`.
38 mod audit {
39 pub fn audit_log_path() -> Option<std::path::PathBuf> {
40 Some(
41 std::env::temp_dir()
42 .join(format!("codewhale-it-audit-{}", std::process::id()))
43 .join("audit.log"),
44 )
45 }
46 }
47 #[path = "../../src/skills/package_digest.rs"]
48 #[allow(dead_code)]
49 mod package_digest;
50 #[path = "../../src/shell_dispatcher.rs"]
51 mod shell_dispatcher;
52 // The legacy text tool-call parser lives in codewhale-core now; keep the
53 // `crate::tool_parser` path the suites use.
54 use codewhale_core::tool_parser;
55 // `shell_dispatcher` reaches raw mode through the runtime's terminal port.
56 use codewhale_runtime::host_terminal;
57
58 mod adaptive_evidence_acceptance;
59 mod cache_guard;
60 mod coordination_acceptance;
61 mod diagnostic_read_only;
62 mod dotenv_authority;
63 mod eval_harness;
64 mod exec_persistent_service;
65 mod exec_stream_drop_acceptance;
66 mod exec_turn_usage;
67 mod integration_mock_llm;
68 mod issue_report_acceptance;
69 mod lifecycle_outbox_exec;
70 mod palette_audit;
71 mod protocol_recovery;
72 mod reasoning_content_replayed_after_tool_call;
73 mod shell_denial_acceptance;
74 mod skill_cli;
75 mod telemetry_contract;
76 mod verifiers_harness_contract;
77 mod workflow_tool_stream_acceptance;
78
78 lines RUST