[Lldb-commits] [PATCH] D130467: [lldb][ARM] Misc improvements to TestEmulations

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 25 02:14:03 PDT 2022


DavidSpickett created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

- Look for files that end width arm/thumb.dat, meaning we don't try to run, for example, vim swap files.
- Print the name of the test that failed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130467

Files:
  lldb/test/API/arm/emulation/TestEmulations.py


Index: lldb/test/API/arm/emulation/TestEmulations.py
===================================================================
--- lldb/test/API/arm/emulation/TestEmulations.py
+++ lldb/test/API/arm/emulation/TestEmulations.py
@@ -20,7 +20,7 @@
         files = os.listdir(test_dir)
         thumb_files = list()
         for f in files:
-            if '-thumb.dat' in f:
+            if f.endswith('-thumb.dat'):
                 thumb_files.append(f)
 
         for f in thumb_files:
@@ -33,7 +33,7 @@
         files = os.listdir(test_dir)
         arm_files = list()
         for f in files:
-            if '-arm.dat' in f:
+            if f.endswith('-arm.dat'):
                 arm_files.append(f)
 
         for f in arm_files:
@@ -49,4 +49,5 @@
             print('\nRunning test ' + os.path.basename(filename))
             print(output)
 
-        self.assertTrue(success, 'Emulation test failed.')
+        self.assertTrue(success, 'Emulation test {} failed.'.format(
+                        filename))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130467.447244.patch
Type: text/x-patch
Size: 1011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220725/7ce88dec/attachment.bin>


More information about the lldb-commits mailing list