Skip to content

Commit a3cd8d7

Browse files
committed
[lldb][lldb-dap][test] Enable variable tests on Windows
At least for our Windows on Arm machine compiling with clang-cl, it has inverted which variables get a `::` prefix. Would not surprise me if msvc does the opposite so feel free to revert if these tests fail for you.
1 parent fee4836 commit a3cd8d7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,19 @@ def do_test_scopes_variables_setVariable_evaluate(
200200
verify_locals["pt"]["$__lldb_extensions"] = {
201201
"equals": {"autoSummary": "{x:11, y:22}"}
202202
}
203+
203204
verify_globals = {
204205
"s_local": {"equals": {"type": "float", "value": "2.25"}},
205-
"::g_global": {"equals": {"type": "int", "value": "123"}},
206-
"s_global": {"equals": {"type": "int", "value": "234"}},
207206
}
207+
s_global = {"equals": {"type": "int", "value": "234"}}
208+
g_global = {"equals": {"type": "int", "value": "123"}}
209+
if lldbplatformutil.getHostPlatform() == "windows":
210+
verify_globals["::s_global"] = s_global
211+
verify_globals["g_global"] = g_global
212+
else:
213+
verify_globals["s_global"] = s_global
214+
verify_globals["::g_global"] = g_global
215+
208216
varref_dict = {}
209217
self.verify_variables(verify_locals, locals, varref_dict)
210218
self.verify_variables(verify_globals, globals, varref_dict)
@@ -393,13 +401,11 @@ def do_test_scopes_variables_setVariable_evaluate(
393401

394402
self.verify_variables(verify_locals, locals)
395403

396-
@skipIfWindows
397404
def test_scopes_variables_setVariable_evaluate(self):
398405
self.do_test_scopes_variables_setVariable_evaluate(
399406
enableAutoVariableSummaries=False
400407
)
401408

402-
@skipIfWindows
403409
def test_scopes_variables_setVariable_evaluate_with_descriptive_summaries(self):
404410
self.do_test_scopes_variables_setVariable_evaluate(
405411
enableAutoVariableSummaries=True
@@ -600,11 +606,9 @@ def do_test_scopes_and_evaluate_expansion(self, enableAutoVariableSummaries: boo
600606
if scope["name"] == "Registers":
601607
self.assertEqual(scope.get("presentationHint"), "registers")
602608

603-
@skipIfWindows
604609
def test_scopes_and_evaluate_expansion(self):
605610
self.do_test_scopes_and_evaluate_expansion(enableAutoVariableSummaries=False)
606611

607-
@skipIfWindows
608612
def test_scopes_and_evaluate_expansion_with_descriptive_summaries(self):
609613
self.do_test_scopes_and_evaluate_expansion(enableAutoVariableSummaries=True)
610614

0 commit comments

Comments
 (0)