summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/Reproducer/TestDriverOptions.test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/Shell/Reproducer/TestDriverOptions.test')
-rw-r--r--lldb/test/Shell/Reproducer/TestDriverOptions.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/test/Shell/Reproducer/TestDriverOptions.test b/lldb/test/Shell/Reproducer/TestDriverOptions.test
new file mode 100644
index 00000000000..4b5dfbf063c
--- /dev/null
+++ b/lldb/test/Shell/Reproducer/TestDriverOptions.test
@@ -0,0 +1,17 @@
+# Check that errors are propagated to the driver.
+#
+# RUN: not %lldb --capture --capture-path %t/bogus/bogus 2>&1 | FileCheck %s --check-prefix INVALID-CAPTURE
+# RUN: not %lldb --replay %t/bogus/bogus 2>&1 | FileCheck %s --check-prefix INVALID-REPLAY
+#
+# INVALID-CAPTURE: unable to create reproducer directory
+# INVALID-REPLAY: unable to load reproducer index
+
+# Check that all option combination work as expected.
+#
+# RUN: %lldb --capture --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
+# RUN: %lldb --capture -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
+# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE
+#
+# NO-WARNING-NOT: warning: -capture-path specified without -capture
+# WARNING: warning: -capture-path specified without -capture
+# STATUS-CAPTURE: Reproducer is in capture mode.
OpenPOWER on IntegriCloud