aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/configuration.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/configuration.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/configuration.py11
1 files changed, 10 insertions, 1 deletions
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