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]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/f802cdb6101ee21743df0bbca3478eafadda9407

The commit has been mentioned in the following issue(s):
 - Rust-GCC/gccrs#5110: https://github.com/Rust-GCC/gccrs/issues/5110

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/5111

 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 eebac9761..ef19748c9 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

base-commit: 930cd96bb36ece6749ecac82aafb1eb3f054b908
-- 
2.56.1

Reply via email to