summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
diff options
context:
space:
mode:
authorAleksandr Urakov <aleksandr.urakov@jetbrains.com>2018-12-04 11:08:02 +0000
committerAleksandr Urakov <aleksandr.urakov@jetbrains.com>2018-12-04 11:08:02 +0000
commiteecf48785b03c5e5b5af606f0da0026553c37a62 (patch)
treeafb65809d5b1235f54378a8194f5e1f9a1cc0781 /lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
parent1a2e0200acca7bfd8712eef7bb0cf1dc52347b07 (diff)
downloadbcm5719-llvm-eecf48785b03c5e5b5af606f0da0026553c37a62.tar.gz
bcm5719-llvm-eecf48785b03c5e5b5af606f0da0026553c37a62.zip
[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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py15
1 files changed, 15 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud