[rtems-testing commit] Add removal of CR from output of tsim.

Jennifer Averett jennifer at rtems.org
Wed May 14 19:11:08 UTC 2014


Module:    rtems-testing
Branch:    master
Commit:    32a4ebc59f20fbdaa909345ab41bc5e07a432c1b
Changeset: http://git.rtems.org/rtems-testing/commit/?id=32a4ebc59f20fbdaa909345ab41bc5e07a432c1b

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed May 14 14:15:48 2014 -0500

Add removal of CR from output of tsim.

---

 sim-scripts/gdb-sim-run.in |   12 +++++++-----
 sim-scripts/tsim-support   |    1 +
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/sim-scripts/gdb-sim-run.in b/sim-scripts/gdb-sim-run.in
index 252bd19..16c79b6 100755
--- a/sim-scripts/gdb-sim-run.in
+++ b/sim-scripts/gdb-sim-run.in
@@ -274,15 +274,17 @@ checkGenericExits()
 catLog()
 {
   logfile=${1}
-  if [ ${doCatOutput} = "no" ] ; then
-    return
-  fi
 
   if [ ${bspNeedsDos2Unix} = "yes" ] ; then
-    dos2unix ${logfile}
+    sed --in-place -e 's/\r//g' ${logfile}
+    # alternative way to do the above
+    # tr -d "\015" <${logfile}
   fi
 
-  tr -d "\015" <${logfile}
+  if [ ${doCatOutput} = "no" ] ; then
+    return
+  fi
+  cat ${logfile}
   echo
 }
 
diff --git a/sim-scripts/tsim-support b/sim-scripts/tsim-support
index ae4acb8..cabbee9 100644
--- a/sim-scripts/tsim-support
+++ b/sim-scripts/tsim-support
@@ -8,6 +8,7 @@ bspUsesGDBSimulator="no"
 bspGeneratesGDBCommands="yes"
 bspSupportsGDBServerMode="yes"
 bspNeedsSttySane="no"
+bspNeedsDos2Unix="yes"
 
 type ${runBSP} >/dev/null 2>&1
 if [ $? -ne 0 ] ; then




More information about the vc mailing list