mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
docs: 清理测试运行器注释的档位与口径措辞
This commit is contained in:
@@ -12,9 +12,9 @@ pub(crate) struct RunConfig {
|
||||
pub(crate) supervise: bool,
|
||||
pub(crate) leak_check: bool,
|
||||
pub(crate) leak_check_interval: usize,
|
||||
/// 关闭 liveness/精确 DCE/RegAlloc 链(on/off 对比基础设施)。
|
||||
/// 关闭 liveness/精确 DCE/RegAlloc 链(开关对比:关优化链 vs 开优化链各跑一遍)。
|
||||
pub(crate) no_regalloc: bool,
|
||||
/// 逐测试打印 PASS/FAIL/SKIP(on/off 结果集合对比用)。
|
||||
/// 逐测试打印 PASS/FAIL/SKIP(开关对比时对比两轮结果集合用)。
|
||||
pub(crate) verbose: bool,
|
||||
/// 汇总尾部不打印 FAIL 清单。
|
||||
pub(crate) no_fail_list: bool,
|
||||
|
||||
@@ -49,7 +49,7 @@ pub(crate) fn is_skipped(meta: &TestMeta) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
/// eval 相关子族精确排除(档 1+2 后):
|
||||
/// eval 相关子族精确排除:
|
||||
/// built-ins/eval 与 eval-code 的完成值/解析失败/非字符串/this-value-global/间接环境族放行;
|
||||
/// 仅排除确定失败的 arguments/super/strict/块声明 等子族。
|
||||
pub(crate) fn eval_family_excluded(path: &str) -> Option<&'static str> {
|
||||
@@ -58,28 +58,28 @@ pub(crate) fn eval_family_excluded(path: &str) -> Option<&'static str> {
|
||||
}
|
||||
let is_direct = path.contains("eval-code/direct/");
|
||||
let common = [
|
||||
"declare-arguments", // 直接 eval 的 arguments 语义族(档 3)
|
||||
"this-value-func", // 调用者 this 传递(档 3)
|
||||
"new.target", // new.target 语义(档 3)
|
||||
"strict-caller", // 严格调用者传播(档 3)
|
||||
"declare-arguments", // 直接 eval 的 arguments 语义族
|
||||
"this-value-func", // 调用者 this 传递
|
||||
"new.target", // new.target 语义
|
||||
"strict-caller", // 严格调用者传播
|
||||
"strict-source",
|
||||
"strictness-override", // 直接 eval 严格性覆盖
|
||||
"onlystrict", // onlyStrict 块声明族
|
||||
"always-non-strict", // 依赖隐式全局写同步(既有债务)
|
||||
"always-non-strict", // 依赖隐式全局写同步,引擎尚未实现
|
||||
"block-decl", // 块级函数声明(Annex B 严格变体)
|
||||
"switch-case-decl",
|
||||
"switch-dflt-decl",
|
||||
];
|
||||
if common.iter().any(|s| path.contains(s)) {
|
||||
return Some("eval 子族未实现(档 1-2 边界)");
|
||||
return Some("eval 子族未实现");
|
||||
}
|
||||
if is_direct {
|
||||
// 直接 eval:调用者作用域交互族(函数上下文 var/let + super 方法上下文),档 3 前失败
|
||||
// 直接 eval:调用者作用域交互族(函数上下文 var/let + super 方法上下文)
|
||||
if ["var-env-", "lex-env-", "super-prop", "super-call-arrow", "super-call-method"]
|
||||
.iter()
|
||||
.any(|s| path.contains(s))
|
||||
{
|
||||
return Some("直接 eval 作用域族未实现(档 3)");
|
||||
return Some("直接 eval 作用域族未实现");
|
||||
}
|
||||
} else if [
|
||||
"super-",
|
||||
@@ -96,7 +96,7 @@ pub(crate) fn eval_family_excluded(path: &str) -> Option<&'static str> {
|
||||
None
|
||||
}
|
||||
|
||||
/// 确定性 pre-existing 失败白名单:引擎既有语义债务(非近期改动引入),
|
||||
/// 确定性失败白名单:引擎尚未实现该语义的测试集,
|
||||
/// 修复前归入 skip 以免噪音掩盖真实回归;对应缺口修好后移出本列表。
|
||||
pub(crate) fn pre_existing_excluded(path: &str) -> Option<&'static str> {
|
||||
const LIST: &[(&str, &str)] = &[
|
||||
|
||||
@@ -233,7 +233,7 @@ fn classify_vm_error(e: &str, neg: Option<&Negative>, no_skip: bool) -> TestOutc
|
||||
/// 把失败消息归类为可聚合的失败类别与 subkey,返回 `(category, subkey)`。
|
||||
///
|
||||
/// # 边界与前提
|
||||
/// - 类别大类名口径不变(心跳序列化 / 既有基线对比兼容);碎片桶
|
||||
/// - 类别大类名是心跳序列化格式与基线报告的契约键(改动会使旧心跳行对不上);碎片桶
|
||||
/// (`compile: other` / `vm: other` / `other`)不再携带消息尾巴
|
||||
/// (全文已在 FailRecord.message)。
|
||||
/// - subkey 仅 `not callable`(调用点,提取失败归 `(none)`)与
|
||||
@@ -447,7 +447,7 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// categorize_fail 双返回:类别大类名口径不变(碎片桶去消息尾巴),
|
||||
/// categorize_fail 双返回:类别大类名按心跳契约键命名(碎片桶去消息尾巴),
|
||||
/// subkey 仅 not callable / not defined 三类非空,IC_GET_PROP 独立成桶。
|
||||
/// not defined 覆盖 `vm error: ` 生产形态(subkey 非空)与无前缀裸形态
|
||||
/// (形态门:parse 出标识符才入桶);negative mismatch 形态归 other。
|
||||
|
||||
@@ -34,8 +34,8 @@ pub fn escape_log_field(s: &str) -> String {
|
||||
s.replace(['\t', '\n', '\r'], " ")
|
||||
}
|
||||
|
||||
/// 原 print_fail_categories 的 String 版:类别计数降序;`vm: other`/`compile: other`
|
||||
/// /`other` 碎片桶附带 ≤5 条样本(`路径 消息首行`)。空类别返回空串。
|
||||
/// 类别计数降序的打印版(返回 String,可单测);`vm: other`/`compile: other`/`other`
|
||||
/// 碎片桶附带 ≤5 条样本(`路径 消息首行`)。空类别返回空串。
|
||||
pub fn format_fail_categories(stats: &RunStats, paths: &[PathBuf]) -> String {
|
||||
if stats.fail_categories.is_empty() {
|
||||
return String::new();
|
||||
|
||||
@@ -17,9 +17,8 @@ pub(crate) struct RunStats {
|
||||
pub(crate) fail: usize,
|
||||
pub(crate) skip: usize,
|
||||
pub(crate) total_ms: u64,
|
||||
pub(crate) fail_categories: HashMap<String, usize>, // 计数口径不变(兼容心跳序列化与既有基线对比)
|
||||
// ↓ 新增 ↓
|
||||
pub(crate) categories: Vec<String>, // 类别 id 表(FailRecord.category_id 索引)
|
||||
pub(crate) fail_categories: HashMap<String, usize>, // 类别名是心跳序列化格式与基线报告的契约键,改动会使旧心跳行对不上
|
||||
pub(crate) categories: Vec<String>, // 类别 id 表(FailRecord.category_id 索引)
|
||||
pub(crate) fail_records: Vec<FailRecord>,
|
||||
pub(crate) fail_record_bytes: usize, // 累计 message 字节(OOM cap)
|
||||
// supervise 模式异常计数:spawn 失败 / try_wait 错误 / 心跳写失败(子进程侧
|
||||
|
||||
Reference in New Issue
Block a user