Skip to content

Commit

Permalink
[lldb][ARM] Misc improvements to TestEmulations
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
DavidSpickett committed Jul 26, 2022
1 parent 19c5638 commit c4b6e5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lldb/test/API/arm/emulation/TestEmulations.py
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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))

0 comments on commit c4b6e5f

Please sign in to comment.