From: Utkarsh Bahuguna <[email protected]>
The rig only wrote its diff to rust.log, which CI doesn't show. Print it
with send_user so it lands right above the FAIL line.
Fixes Rust-GCC/gccrs#5110
gcc/testsuite/ChangeLog:
* rust/core/core-diagnostics.exp (core-diagnostics): Print the diff
and the update hint instead of only logging them.
Signed-off-by: Utkarsh Bahuguna <[email protected]>
Tested on x86_64-pc-linux-gnu.
---
gcc/testsuite/rust/core/core-diagnostics.exp | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/testsuite/rust/core/core-diagnostics.exp
b/gcc/testsuite/rust/core/core-diagnostics.exp
index eebac9761dc..ef19748c945 100644
--- a/gcc/testsuite/rust/core/core-diagnostics.exp
+++ b/gcc/testsuite/rust/core/core-diagnostics.exp
@@ -56,10 +56,11 @@ proc core-diagnostics { } {
close $f
catch { exec diff -u $expected $actual } diff
regsub {\nchild process exited abnormally$} $diff "" diff
- send_log "diff -u core-1.49.expected core-diagnostics.out:\n$diff\n"
- send_log "if the change is expected, update the file with\n"
- send_log " $srcdir/$subdir/regen-core-expected.sh <build dir>\n"
- fail "$name: diagnostics differ from core-1.49.expected, see rust.log"
+ # print it, rust.log isn't shown in CI
+ send_user "diff -u core-1.49.expected core-diagnostics.out:\n$diff\n"
+ send_user "if the change is expected, update the file with\n"
+ send_user " $srcdir/$subdir/regen-core-expected.sh <build dir>\n"
+ fail "$name: diagnostics differ from core-1.49.expected"
}
set individual_timeout 1200
--
2.55.0