[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pass the -noecho option to spawn
From: |
Jonathan Wakely |
Subject: |
Pass the -noecho option to spawn |
Date: |
Mon, 19 Dec 2022 13:14:23 +0000 |
Is there a reason that dejagnu's local_exec proc doesn't use the
-noecho option for spawning the command?
Every log contains the spawned commands twice because dejagnu prints
it then spawn repeats it (with an annoying \r appended, making copy &
paste from the logs more awkward than it needs to be).
For example:
Executing on build: msgfmt -o fr/LC_MESSAGES/libstdc++.mo
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/../po/fr.po
(timeout = 300)
spawn -ignore SIGHUP msgfmt -o fr/LC_MESSAGES/libstdc++.mo
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/../po/fr.po^M
Executing on build: msgfmt -o de/LC_MESSAGES/libstdc++.mo
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/../po/de.po
(timeout = 300)
spawn -ignore SIGHUP msgfmt -o de/LC_MESSAGES/libstdc++.mo
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/../po/de.po^M
I find this annoying. Is there any reason not to disable it?
diff --git a/lib/remote.exp b/lib/remote.exp
index 1c9971a..1e45810 100644
--- a/lib/remote.exp
+++ b/lib/remote.exp
@@ -165,7 +165,7 @@ proc local_exec { commandline inp outp timeout } {
global errorInfo
if { $inp eq "" && $outp eq "" } {
set id -1
- set result [catch "eval spawn -ignore SIGHUP \{${commandline}\}" pid]
+ set result [catch "eval spawn -ignore SIGHUP -noecho
\{${commandline}\}" pid]
if { $result == 0 } {
set result2 0
} else {
I don't know whether the other spawn command on line 193 should also
use -noecho, I've only patched line 168 locally. With that change, my
logs are half the size and have no annoying carriage returns.
- Pass the -noecho option to spawn,
Jonathan Wakely <=