aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/configuration.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2020-05-14 17:57:10 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2020-05-14 17:58:27 -0700
commitbf02bcffcfd7dc965e930c6a3035895823d2d78b (patch)
tree056eef2f3b1da7e6f0f1dbcd3cc371845eca4547 /lldb/packages/Python/lldbsuite/test/configuration.py
parent5df55bc7a46fd5319402ac856753bc5ba5e7fb8a (diff)
downloadllvm-bf02bcffcfd7dc965e930c6a3035895823d2d78b.zip
llvm-bf02bcffcfd7dc965e930c6a3035895823d2d78b.tar.gz
llvm-bf02bcffcfd7dc965e930c6a3035895823d2d78b.tar.bz2
[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.
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