This revision was automatically updated to reflect the committed changes.
Closed by commit rG3afe296c81b9: [test][lldb-vscode] Relax assertion to allow
multiple compile units returned. (authored by rupprecht).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138344/new/
https://reviews.llvm.org/D138344
Files:
lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
Index: lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
===================================================================
--- lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
+++ lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
@@ -73,7 +73,6 @@
@skipIfWindows
@skipIfRemote
- @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr49418")
def test_compile_units(self):
program = self.getBuildArtifact("a.out")
self.build_and_launch(program)
@@ -86,7 +85,5 @@
moduleId = self.vscode.get_modules()['a.out']['id']
response = self.vscode.request_compileUnits(moduleId)
self.assertTrue(response['body'])
- self.assertEqual(len(response['body']['compileUnits']), 1,
- 'Only one source file should exist')
-
self.assertEqual(response['body']['compileUnits'][0]['compileUnitPath'],
main_source_path,
- 'Real path to main.cpp matches')
+ cu_paths = [cu['compileUnitPath'] for cu in
response['body']['compileUnits']]
+ self.assertIn(main_source_path, cu_paths, 'Real path to main.cpp
matches')
Index: lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
===================================================================
--- lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
+++ lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
@@ -73,7 +73,6 @@
@skipIfWindows
@skipIfRemote
- @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr49418")
def test_compile_units(self):
program = self.getBuildArtifact("a.out")
self.build_and_launch(program)
@@ -86,7 +85,5 @@
moduleId = self.vscode.get_modules()['a.out']['id']
response = self.vscode.request_compileUnits(moduleId)
self.assertTrue(response['body'])
- self.assertEqual(len(response['body']['compileUnits']), 1,
- 'Only one source file should exist')
- self.assertEqual(response['body']['compileUnits'][0]['compileUnitPath'], main_source_path,
- 'Real path to main.cpp matches')
+ cu_paths = [cu['compileUnitPath'] for cu in response['body']['compileUnits']]
+ self.assertIn(main_source_path, cu_paths, 'Real path to main.cpp matches')
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits