File dwz-make-dejagnu-logs-more-elaborate.patch of Package dwz

From 5ae6047adef9648f50e007b23df09d38de5e0729 Mon Sep 17 00:00:00 2001
From: "Frank Ch. Eigler" <fche@redhat.com>
Date: Sat, 18 Feb 2023 12:36:15 +0100
Subject: [PATCH 1/4] make dejagnu logs more elaborate

dwz-tests.exp produces totally barebones dwz.log files, basically
duplicating the .sum file.  If there are any errors, there's
basically no info to go on.

The patch runs the .sh subtests in -x trace mode, and logs
stdout/stderr to the .log file, so e.g. bunsen can safe-keep it.
Otherwise I believe no-op.
---
 testsuite/dwz.tests/dwz-tests.exp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index 811767f..85e6fcd 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -116,16 +116,17 @@ foreach test $tests {
     exec mkdir $dir
 
     cd $dir
-    if { [catch { exec sh -e $test } msg] } {
+    if { [catch { exec sh -x -e $test 2>@1 } msg] } {
+        verbose -log "$msg"
 	if { [lindex $::errorCode 0] == "CHILDSTATUS" && \
 		 [lindex $::errorCode 2] == 77 } {
 	    unsupported "$test"
 	    exec rm -Rf $dir
 	} else {
-	    puts "$msg"
 	    fail "$test"
 	}
     } else {
+        verbose -log "$msg"
 	if { [file exists dwz.info ] } {
 	    set info [exec cat dwz.info]
 	    verbose -log "$test:" 1
-- 
2.43.0

openSUSE Build Service is sponsored by