[Lldb-commits] [lldb] c4b6e5f - [lldb][ARM] Misc improvements to TestEmulations

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 26 01:32:00 PDT 2022


Author: David Spickett
Date: 2022-07-26T08:31:55Z
New Revision: c4b6e5f9500fc3c44d587896eb402c8ede21eb10

URL: https://github.com/llvm/llvm-project/commit/c4b6e5f9500fc3c44d587896eb402c8ede21eb10
DIFF: https://github.com/llvm/llvm-project/commit/c4b6e5f9500fc3c44d587896eb402c8ede21eb10.diff

LOG: [lldb][ARM] Misc improvements to TestEmulations

* 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.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D130467

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/arm/emulation/TestEmulations.py b/lldb/test/API/arm/emulation/TestEmulations.py
index 0e30949bc5f48..84119efb3aeb6 100644
--- a/lldb/test/API/arm/emulation/TestEmulations.py
+++ b/lldb/test/API/arm/emulation/TestEmulations.py
@@ -20,7 +20,7 @@ def test_thumb_emulations(self):
         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 @@ def test_arm_emulations(self):
         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 @@ def run_a_single_test(self, filename):
             print('\nRunning test ' + os.path.basename(filename))
             print(output)
 
-        self.assertTrue(success, 'Emulation test failed.')
+        self.assertTrue(success, 'Emulation test {} failed.'.format(
+                        filename))


        


More information about the lldb-commits mailing list