From bf02bcffcfd7dc965e930c6a3035895823d2d78b Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 14 May 2020 17:57:10 -0700 Subject: [lldb/Test] Modify more tests for API replay Skip tests or parts thereof that aren't expected to work when run from a reproducer. Also improve the doc comments in configuration.py to prevent mistakes in the future. --- lldb/packages/Python/lldbsuite/test/configuration.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test/configuration.py') diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py index 53f587b..0439c4e 100644 --- a/lldb/packages/Python/lldbsuite/test/configuration.py +++ b/lldb/packages/Python/lldbsuite/test/configuration.py @@ -163,6 +163,15 @@ def get_filecheck_path(): def is_reproducer_replay(): """ - Returns true when test is replayed from a reproducer. + Returns true when dotest is being replayed from a reproducer. Never use + this method to guard SB API calls as it will cause a divergence between + capture and replay. """ return replay_path is not None + +def is_reproducer(): + """ + Returns true when dotest is capturing a reproducer or is being replayed + from a reproducer. Use this method to guard SB API calls. + """ + return capture_path or replay_path -- cgit v1.1