From 5f92c9895d393a512f85fbb553f31314f3fd2d12 Mon Sep 17 00:00:00 2001 From: ARCJ137442 <61109168+ARCJ137442@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:42:07 +0800 Subject: [PATCH] =?UTF-8?q?test:=20:white=5Fcheck=5Fmark:=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=B1=9E=E6=80=A7=E5=AE=8F=E3=80=8Cignore=E3=80=8D?= =?UTF-8?q?=E5=BF=BD=E7=95=A5=E9=83=A8=E5=88=86=E3=80=90=E4=B8=8D=E5=AE=9C?= =?UTF-8?q?=E5=8F=82=E4=B8=8E=E6=95=B4=E4=BD=93=E6=B5=8B=E8=AF=95=E3=80=91?= =?UTF-8?q?=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ①忽略所有「整体测试后留下残余子进程」的测试(OpenNARS、NARS-Python)②忽略Websocket相关、仅用于快捷运行的「持续性压力测试」 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/bin/babelnar_cli/arg_parse.rs | 1 + src/bin/babelnar_cli/main.rs | 6 +++++- src/bin/ws_server_test/main.rs | 2 ++ src/cin_implements/nars_python/mod.rs | 1 + src/cin_implements/openjunars/mod.rs | 1 + src/cin_implements/opennars/mod.rs | 2 ++ src/runtimes/command_vm/runtime.rs | 1 + 9 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 683bb1b..ffbda46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -73,7 +73,7 @@ checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "babel_nar" -version = "0.21.0" +version = "0.21.1" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 0204430..91555a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "babel_nar" -version = "0.21.0" +version = "0.21.1" edition = "2021" description = """ Implementation and application supports of the NAVM model diff --git a/src/bin/babelnar_cli/arg_parse.rs b/src/bin/babelnar_cli/arg_parse.rs index 2270b28..9517db6 100644 --- a/src/bin/babelnar_cli/arg_parse.rs +++ b/src/bin/babelnar_cli/arg_parse.rs @@ -158,6 +158,7 @@ mod tests { /// 测试/成功的解析 #[test] + #[ignore = "【2024-04-14 20:24:52】会导致残留子进程"] fn test_arg_parse() { test_arg_parse! { ["-c", ARG_PARSE_TEST] diff --git a/src/bin/babelnar_cli/main.rs b/src/bin/babelnar_cli/main.rs index bfb6c5f..f460ff7 100644 --- a/src/bin/babelnar_cli/main.rs +++ b/src/bin/babelnar_cli/main.rs @@ -146,7 +146,8 @@ mod tests { /// 批量生成「预引入NAL」 macro_rules! cin_tests { ( - $cin_path:expr; + $(#[$attr_root:meta])* + $cin_path:ident; // ! ❌若为`expr`,则会和上边的修饰符导致「本地歧义」 $( $(#[$attr:meta])* $name:ident => $config_path:expr $(;)? @@ -155,6 +156,7 @@ mod tests { /// 主Shell /// * 🎯正常BabelNAR CLI shell启动 /// * 🎯正常用户命令行交互体验 + $(#[$attr_root])* #[test] pub fn main_shell() -> Result<()> { main($cin_path, &[]) @@ -163,6 +165,7 @@ mod tests { /// Matriangle服务器 /// * 🎯复现先前基于Matriangle环境的NARS实验 + $(#[$attr_root])* #[test] pub fn main_matriangle_server() -> Result<()> { // 以默认参数启动 @@ -219,6 +222,7 @@ mod tests { use super::*; cin_tests! { + #[ignore = "【2024-04-14 20:24:52】会导致残留子进程"] OPENNARS; /// 简单演绎 diff --git a/src/bin/ws_server_test/main.rs b/src/bin/ws_server_test/main.rs index 52c0ccd..faa0381 100644 --- a/src/bin/ws_server_test/main.rs +++ b/src/bin/ws_server_test/main.rs @@ -99,6 +99,7 @@ fn main() { } #[test] +#[ignore = "【2024-04-14 20:38:45】仅作为其它Websocket服务端的压力测试,不应在库测试中出现"] fn test_overwhelming_nse() { loop { let _ = ws::connect("ws://127.0.0.1:8765", |sender| { @@ -123,6 +124,7 @@ fn test_overwhelming_nse() { /// 压力测试 /// * 🔗GitHub issue: #[test] +#[ignore = "【2024-04-14 20:38:45】仅作为其它Websocket服务端的压力测试,不应在库测试中出现"] fn main_server() { // A client that sends tons of messages to the server thread::spawn(move || { diff --git a/src/cin_implements/nars_python/mod.rs b/src/cin_implements/nars_python/mod.rs index 469211c..0184be9 100644 --- a/src/cin_implements/nars_python/mod.rs +++ b/src/cin_implements/nars_python/mod.rs @@ -24,6 +24,7 @@ mod tests { }; #[test] + #[ignore = "【2024-04-14 20:24:52】会导致残留子进程"] fn test() { // 从别的地方获取exe路径 let exe_path = NARS_PYTHON; diff --git a/src/cin_implements/openjunars/mod.rs b/src/cin_implements/openjunars/mod.rs index 7804c79..9dc4383 100644 --- a/src/cin_implements/openjunars/mod.rs +++ b/src/cin_implements/openjunars/mod.rs @@ -24,6 +24,7 @@ mod tests { }; #[test] + #[ignore = "【2024-04-14 20:24:52】会导致残留子进程"] fn test() { // 从别的地方获取jl路径 let jl_path = OPENJUNARS; diff --git a/src/cin_implements/opennars/mod.rs b/src/cin_implements/opennars/mod.rs index dd2d9b1..2f4aaf6 100644 --- a/src/cin_implements/opennars/mod.rs +++ b/src/cin_implements/opennars/mod.rs @@ -35,6 +35,7 @@ mod tests { /// 测试 #[test] + #[ignore = "【2024-04-14 20:24:52】会导致残留子进程"] fn test() { // 启动OpenNARS虚拟机 let vm = launch_vm(); @@ -44,6 +45,7 @@ mod tests { /// 测试/通用 | 基于Narsese #[test] + #[ignore = "【2024-04-14 20:24:52】会导致残留子进程"] fn test_universal() { // 启动OpenNARS虚拟机 let vm = launch_vm(); diff --git a/src/runtimes/command_vm/runtime.rs b/src/runtimes/command_vm/runtime.rs index 17d4574..c7dd048 100644 --- a/src/runtimes/command_vm/runtime.rs +++ b/src/runtimes/command_vm/runtime.rs @@ -359,6 +359,7 @@ pub mod tests { /// 示例测试 | OpenNARS /// * 🚩通过Java命令启动 #[test] + #[ignore = "【2024-04-14 20:24:52】会导致残留子进程"] fn test_opennars() { // 构造指令 let mut command_java = Command::new(COMMAND_JAVA);