summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--linkers/rtems-score-thread.ini5
-rwxr-xr-xrtemstoolkit/execute.py12
-rw-r--r--tester/rt/pygdb/spark.py2
-rw-r--r--tester/rt/test.py4
4 files changed, 15 insertions, 8 deletions
diff --git a/linkers/rtems-score-thread.ini b/linkers/rtems-score-thread.ini
index 974bcfd..a759f72 100644
--- a/linkers/rtems-score-thread.ini
+++ b/linkers/rtems-score-thread.ini
@@ -5,7 +5,7 @@
trace = _Thread_Handler_initialization, _Thread_Create_idle, _Thread_Start_multitasking
trace = _Stack_Allocate, _Stack_Free, _Thread_Start
trace = _Thread_Yield, _Thread_Set_life_protection
-trace = _Thread_Kill_zombies, _Thread_Close
+trace = _Thread_Kill_zombies
trace = _Thread_Clear_state, _Thread_Set_state, _Thread_Load_environment
trace = _Thread_Handler
trace = _Thread_Get
@@ -19,7 +19,7 @@ trace = _Stack_Allocate, _Thread_Start
trace = _Thread_Restart, _Thread_Handler
[rtems-score-thread-destroy]
-trace = _Thread_Kill_zombies, _Thread_Close
+trace = _Thread_Kill_zombies
[rtems-score-thread-activity]
trace = _Thread_Yield, _Thread_Set_life_protection
@@ -38,7 +38,6 @@ _Thread_Start = Status_Control, Thread_Control*, const Thread_Entry_information*
_Thread_Yield = void, Thread_Control*
_Thread_Set_life_protection = Thread_Life_state, Thread_Life_state
_Thread_Kill_zombies = void, void
-_Thread_Close = void, Thread_Control*, Thread_Control*, Thread_Close_context*
_Thread_Clear_state = States_Control, Thread_Control*, States_Control
_Thread_Set_state = States_Control, Thread_Control*, States_Control
_Thread_Load_environment = void, Thread_Control*
diff --git a/rtemstoolkit/execute.py b/rtemstoolkit/execute.py
index 31d3a8a..c7d8134 100755
--- a/rtemstoolkit/execute.py
+++ b/rtemstoolkit/execute.py
@@ -37,6 +37,7 @@
from __future__ import print_function
import functools
+import codecs
import io
import os
import re
@@ -203,6 +204,10 @@ class execute(object):
stacktraces.trace()
if trace_threads:
print('execute:_readthread: start')
+ if sys.stdout.encoding is not None:
+ decoder = codecs.getincrementaldecoder(sys.stdout.encoding)()
+ else:
+ decoder = None
count = 0
line = ''
try:
@@ -222,8 +227,8 @@ class execute(object):
_output_line(line + '\n', exe, prefix, out, count)
break
# str and bytes are the same type in Python2
- if type(data) is not str and type(data) is bytes:
- data = data.decode(sys.stdout.encoding)
+ if decoder is not None and type(data) is not str and type(data) is bytes:
+ data = decoder.decode(data)
last_ch = data[-1]
sd = (line + data).split('\n')
if last_ch != '\n':
@@ -382,6 +387,9 @@ class execute(object):
if self.verbose:
log.output(what + ': ' + cs)
log.trace('exe: %s' % (cs))
+ if shell and self.shell_exe:
+ command = arg_list(command)
+ command[:0] = self.shell_exe
if not stdin and self.input:
stdin = subprocess.PIPE
if not stdout:
diff --git a/tester/rt/pygdb/spark.py b/tester/rt/pygdb/spark.py
index 0eac365..b669998 100644
--- a/tester/rt/pygdb/spark.py
+++ b/tester/rt/pygdb/spark.py
@@ -119,7 +119,7 @@ class GenericParser:
self.augment(start)
self.ruleschanged = 1
- _NULLABLE = '\e_'
+ _NULLABLE = r'\e_'
_START = 'START'
_BOF = '|-'
diff --git a/tester/rt/test.py b/tester/rt/test.py
index db5939b..9108206 100644
--- a/tester/rt/test.py
+++ b/tester/rt/test.py
@@ -71,7 +71,7 @@ class log_capture(object):
def get(self):
s = []
status = []
- status_regx = re.compile('^\[\s*\d+/\s*\d+\] p:.+')
+ status_regx = re.compile(r'^\[\s*\d+/\s*\d+\] p:.+')
for l in self.log:
if status_regx.match(l):
status += [l]
@@ -175,7 +175,7 @@ def find_executables(paths, glob):
for f in files:
if fnmatch.fnmatch(f.lower(), glob):
executables += [path.join(root, f)]
- norun = re.compile('.*\.norun.*')
+ norun = re.compile(r'.*\.norun.*')
executables = [e for e in executables if not norun.match(e)]
return sorted(executables)