From eecf48785b03c5e5b5af606f0da0026553c37a62 Mon Sep 17 00:00:00 2001 From: Aleksandr Urakov Date: Tue, 4 Dec 2018 11:08:02 +0000 Subject: [Expr] Fix `TestExprOptions` after r348240 on MacOS X Summary: r348240 assumes that an expression contains the Objective C option if Objective C Runtime is found. But on MacOS X it seems that the test application process always contains Objective C Runtime, so the test fails when it assumes that the language is C++ only. Skip this part on Darwin. llvm-svn: 348250 --- .../test/expression_command/options/TestExprOptions.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py') diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py b/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py index e1a4d8b9414..13bc3b7ce2a 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py @@ -14,6 +14,7 @@ import os import time import lldb import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -64,6 +65,20 @@ class ExprOptionsTestCase(TestBase): self.assertTrue(val.IsValid()) self.assertFalse(val.GetError().Success()) + @skipIfDarwin + def test_expr_options_lang(self): + """These expression language options should work as expected.""" + self.build() + + # Set debugger into synchronous mode + self.dbg.SetAsync(False) + + (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( + self, '// breakpoint_in_main', self.main_source_spec) + + frame = thread.GetFrameAtIndex(0) + options = lldb.SBExpressionOptions() + # Make sure we can retrieve `id` variable if language is set to C++11: options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11) val = frame.EvaluateExpression('id == 0', options) -- cgit v1.2.3