[rtems-tools commit] test, rtemstoolkit: Fix regx escape errors on python 3.12

Chris Johns chrisj at rtems.org
Mon Apr 22 06:42:29 UTC 2024


Module:    rtems-tools
Branch:    master
Commit:    3368e6b1aabcf90a0a75d6e5009bcb3199a93888
Changeset: http://git.rtems.org/rtems-tools/commit/?id=3368e6b1aabcf90a0a75d6e5009bcb3199a93888

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Apr 19 11:13:04 2024 +1000

test, rtemstoolkit: Fix regx escape errors on python 3.12

---

 tester/rt/pygdb/spark.py | 2 +-
 tester/rt/test.py        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

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)
 



More information about the vc mailing list