Re: rtems6 sb-set-builder gdb enable-tui?

2023-10-07 Thread Chris Johns
On 7 Oct 2023, at 6:36 pm, Shiro  wrote:Hello, I'd like to build RTEMS' tools from git (rtems 6), but I'd like gdb configured with "--enable-tui".  Any advice on where/how to tweak the scripts would be appreciated.Edit the configure command line here …gdb-common-1.cfg « config « source-builder - rtems-source-builder - RTEMS tools and packages source builder.git.rtems.orgThis could be enabled by default. Chris___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[rtems-tools PATCH] tester/tftp: Add a session timeout

2023-10-07 Thread chrisj
From: Chris Johns 

- Fix listener done state

- Finish open with the state as finished

Closes #4959
---
 tester/rt/config.py | 38 ++-
 tester/rt/report.py |  2 +-
 tester/rt/tftp.py   | 41 ++---
 tester/rt/tftpserver.py | 57 -
 4 files changed, 103 insertions(+), 35 deletions(-)

diff --git a/tester/rt/config.py b/tester/rt/config.py
index 3b12c6c..2d3de2f 100644
--- a/tester/rt/config.py
+++ b/tester/rt/config.py
@@ -284,7 +284,12 @@ class file(config.file):
 raise error.general('invalid %tftp port')
 self.kill_on_end = True
 if not self.opts.dry_run():
+if self.defined('session_timeout'):
+session_timeout = int(self.expand('%{session_timeout}'))
+else:
+session_timeout = 120
 self.process = tester.rt.tftp.tftp(bsp_arch, bsp,
+   session_timeout = 
session_timeout,
trace = self.exe_trace('tftp'))
 if not self.in_error:
 if self.console:
@@ -415,28 +420,37 @@ class file(config.file):
 reset_target = True
 else:
 reset_target = False
-if self.target_start_regx is not None:
-if self.target_start_regx.match(text):
-if self.test_started:
-self._capture_console('target start detected')
+if '*** TIMEOUT TIMEOUT' in text and 
self.defined('target_reset_on_timeout'):
+reset_target = True
+restart = \
+(self.target_start_regx is not None and self.target_start_regx 
is not None)
+if restart:
+if self.test_started:
+self._capture_console('target start detected')
+ok_to_kill = True
+else:
+self.restarts += 1
+if self.restarts > self.max_restarts:
+self._capture_console('target restart maximum count 
reached')
 ok_to_kill = True
 else:
-self.restarts += 1
-if self.restarts > self.max_restarts:
-self._capture_console('target restart maximum 
count reached')
-ok_to_kill = True
-else:
-self.process.target_restart(self.test_started)
+self.process.target_restart(self.test_started)
 if not reset_target and self.target_reset_regx is not None:
 if self.target_reset_regx.match(text):
 self._capture_console('target reset condition detected')
 self._target_command('reset')
 self.process.target_reset(self.test_started)
 if self.kill_on_end:
-if not ok_to_kill and '*** END OF TEST ' in text:
+if not ok_to_kill and \
+   ('*** END OF TEST ' in text or \
+'*** FATAL ***' in text or \
+'*** TIMEOUT TIMEOUT' in text):
 self._capture_console('test end: %s' % (self.test_label))
 if self.test_label is not None:
-ok_to_kill = '*** END OF TEST %s ***' % 
(self.test_label) in text
+ok_to_kill = \
+'*** END OF TEST %s ***' % (self.test_label) in 
text or \
+'*** FATAL ***' in text or \
+'*** TIMEOUT TIMEOUT' in text
 self.process.target_end()
 text = [(self.console_prefix, l) for l in text.replace(chr(13), 
'').splitlines()]
 if self.output is not None:
diff --git a/tester/rt/report.py b/tester/rt/report.py
index a688dc8..642ae73 100644
--- a/tester/rt/report.py
+++ b/tester/rt/report.py
@@ -327,7 +327,7 @@ class report(object):
 for name in results:
 if results[name]['result'] == state:
 l += [' %s' % (path.basename(name))]
-return l
+return sorted(l)
 l = []
 if self.failed:
 l += ['Failures:']
diff --git a/tester/rt/tftp.py b/tester/rt/tftp.py
index 5a1c7b7..d12d8e6 100644
--- a/tester/rt/tftp.py
+++ b/tester/rt/tftp.py
@@ -49,7 +49,8 @@ import tester.rt.tftpserver
 class tftp(object):
 '''RTEMS Testing TFTP base.'''
 
-def __init__(self, bsp_arch, bsp, trace = False):
+def __init__(self, bsp_arch, bsp, session_timeout, trace = False):
+self.session_timeout = session_timeout
 self.trace = trace
 self.lock_trace = False
 self.lock = threading.RLock()
@@ -60,7 +61,7 @@ class tftp(object):
 def __del__(self):
 self.kill()
 
-def _init(self):
+ 

rtems6 sb-set-builder gdb enable-tui?

2023-10-07 Thread Shiro
Hello,

I'd like to build RTEMS' tools from git (rtems 6), but I'd like gdb
configured with "--enable-tui".  Any advice on where/how to tweak
the scripts would be appreciated.

Thanks,
Shiro
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel