Skip to content

Commit aa71d5f

Browse files
committed
Rework tests a bit to support the CI introduced edgecase where sometimes they're summary strings.
1 parent 9f9134e commit aa71d5f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lldb/test/API/commands/statistics/basic/TestStats.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,8 @@ def test_summary_statistics_providers(self):
942942
self.assertIn("string", summary_provider_str)
943943
self.assertIn("'count': 1", summary_provider_str)
944944
self.assertIn("'totalTime':", summary_provider_str)
945-
self.assertIn("'type': 'c++'", summary_provider_str)
945+
# We may hit the std::string C++ provider, or a summary provider string
946+
self.assertRegex(r"'type': '(c++|string)'", summary_provider_str)
946947

947948
self.runCmd("continue")
948949
self.runCmd("command script import BoxFormatter.py")
@@ -974,7 +975,9 @@ def test_summary_statistics_providers_vec(self):
974975
self.assertIn("summaryProviderStatistics", stats)
975976
summary_providers = stats["summaryProviderStatistics"]
976977
summary_provider_str = str(summary_providers)
977-
self.assertIn("std::vector", summary_provider_str)
978978
self.assertIn("'count': 2", summary_provider_str)
979979
self.assertIn("'totalTime':", summary_provider_str)
980-
self.assertIn("'type': 'c++'", summary_provider_str)
980+
self.assertRegex(r"'type': '(c++|string)'", summary_provider_str)
981+
# We may hit the std::vector C++ provider, or a summary provider string
982+
if "c++" in summary_provider_str:
983+
self.assertIn("std::vector", summary_provider_str)

0 commit comments

Comments
 (0)