diff --git a/scripts/ci/check_calvin_determinism.sh b/scripts/ci/check_calvin_determinism.sh index 37ff0d376..37420fd8b 100755 --- a/scripts/ci/check_calvin_determinism.sh +++ b/scripts/ci/check_calvin_determinism.sh @@ -84,9 +84,9 @@ for rel in "${scan_paths[@]}"; do esac # Skip if inside a #[cfg(test)] mod tests { ... } block. - last_cfg=$(awk -v n="$lineno" 'NR<=n && /^#\[cfg\(test\)\]/ {x=NR} END{print x+0}' "$file") + last_cfg=$(awk -v n="$lineno" 'NR<=n && /^[[:space:]]*#\[cfg\(test\)\]/ {x=NR} END{print x+0}' "$file") if [ "$last_cfg" -gt 0 ]; then - close_after=$(awk -v a="$last_cfg" -v b="$lineno" 'NR>a && NRa && NR