mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-06-09 06:57:15 +00:00
fix(regression): allow leading whitespace in [PASS]/[FAIL] anchors
Three regex sites (run_test, run_mf_cosim, run_doppler_cosim) anchored at column 0 with `^\[PASS|^\[FAIL`, but most TBs emit ` [PASS]` / ` [FAIL]` from `task check;` formatting. Anchors silently matched zero markers, the fallback "did anything reach $finish" path reported PASS, and 48 real failures across tb_system_e2e (×2 modes), tb_fft_engine, and tb_fullchain_realdata went unnoticed across PR-D..G. Switch all three anchors to `^[[:space:]]*\[PASS|^[[:space:]]*\[FAIL`. No RTL change. Surfaces the truth — does not fix the underlying test failures (tracked separately as T-2..T-10 in PR-Tests-1 / PR-I).
This commit is contained in:
@@ -299,9 +299,9 @@ run_mf_cosim() {
|
||||
output=$(timeout 120 vvp "$vvp" 2>&1) || true
|
||||
rm -f "$vvp"
|
||||
|
||||
# Check TB internal pass/fail
|
||||
# Check TB internal pass/fail (allow leading whitespace; see run_test note)
|
||||
local tb_fail
|
||||
tb_fail=$(echo "$output" | grep -Ec '^\[FAIL' || true)
|
||||
tb_fail=$(echo "$output" | grep -Ec '^[[:space:]]*\[FAIL' || true)
|
||||
if [[ "$tb_fail" -gt 0 ]]; then
|
||||
echo -e "${RED}FAIL${NC} (TB internal failure)"
|
||||
ERRORS="$ERRORS\n MF Co-Sim ($name): TB internal failure"
|
||||
@@ -360,9 +360,9 @@ run_doppler_cosim() {
|
||||
output=$(timeout 120 vvp "$vvp" 2>&1) || true
|
||||
rm -f "$vvp"
|
||||
|
||||
# Check TB internal pass/fail
|
||||
# Check TB internal pass/fail (allow leading whitespace; see run_test note)
|
||||
local tb_fail
|
||||
tb_fail=$(echo "$output" | grep -Ec '^\[FAIL' || true)
|
||||
tb_fail=$(echo "$output" | grep -Ec '^[[:space:]]*\[FAIL' || true)
|
||||
if [[ "$tb_fail" -gt 0 ]]; then
|
||||
echo -e "${RED}FAIL${NC} (TB internal failure)"
|
||||
ERRORS="$ERRORS\n Doppler Co-Sim ($name): TB internal failure"
|
||||
@@ -427,9 +427,12 @@ run_test() {
|
||||
# informational tags like `[FAIL-INFO]` (used for known unrelated bugs,
|
||||
# e.g. RX-NEW-1 fft_engine bin-shift in tb_matched_filter_processing_chain.v)
|
||||
# which would otherwise false-fire as real failures.
|
||||
# Allow leading whitespace — many TBs emit " [PASS]" with indentation
|
||||
# (the historical anchor `^[PASS]` silently missed those, hiding 22+
|
||||
# failures across tb_system_e2e / tb_fft_engine / tb_fullchain_realdata).
|
||||
local test_pass test_fail
|
||||
test_pass=$(echo "$output" | grep -Ec '^\[PASS( [0-9]+)?\]' || true)
|
||||
test_fail=$(echo "$output" | grep -Ec '^\[FAIL( [0-9]+)?\]' || true)
|
||||
test_pass=$(echo "$output" | grep -Ec '^[[:space:]]*\[PASS( [0-9]+)?\]' || true)
|
||||
test_fail=$(echo "$output" | grep -Ec '^[[:space:]]*\[FAIL( [0-9]+)?\]' || true)
|
||||
|
||||
if [[ "$test_fail" -gt 0 ]]; then
|
||||
echo -e "${RED}FAIL${NC} (pass=$test_pass, fail=$test_fail)"
|
||||
|
||||
Reference in New Issue
Block a user