From a4774cac025d222ed5af46eb230b38f38c5c8fc2 Mon Sep 17 00:00:00 2001 From: Natalia Date: Wed, 14 Jan 2026 12:55:18 -0800 Subject: [PATCH] Fix test regex to match upstream stat output format The test was using regexes that matched Silimate's modified stat output format ('Number of wires: '), but upstream yosys uses a different format (' wires'). Update the regex to match the upstream format. --- tests/various/test_splitnets.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/various/test_splitnets.tcl b/tests/various/test_splitnets.tcl index 9cb2b4305..cab2e2e69 100644 --- a/tests/various/test_splitnets.tcl +++ b/tests/various/test_splitnets.tcl @@ -7,10 +7,11 @@ proc read_stats { file } { set ports 0 set nets 0 foreach line [split $result "\n"] { - if [regexp {Number of wires:[ \t]+([0-9]+)} $line tmp n] { + # Match upstream yosys stat format: " wires" + if [regexp {^\s*(\d+)\s+[\d.]+\s+wires\s*$} $line -> n] { set nets [expr $nets + $n] } - if [regexp {Number of ports:[ \t]+([0-9]+)} $line tmp n] { + if [regexp {^\s*(\d+)\s+[\d.]+\s+ports\s*$} $line -> n] { set ports [expr $ports + $n] } }