Skip to content

Commit 6cbb763

Browse files
authored
Merge pull request #416 from JDevlieghere/change-reproducers-on-by-default
Change how we do default reproducer capture in the driver.
2 parents a56db36 + 2d86ce1 commit 6cbb763

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

lldb/lit/Reproducer/TestDriverOptions.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Check that errors are propagated to the driver.
22
#
3-
# RUN: env LLDB_REPRODUCER_DISABLE_CAPTURE=1 not %lldb --capture --capture-path %t/bogus/bogus 2>&1 | FileCheck %s --check-prefix INVALID-CAPTURE
4-
# RUN: env LLDB_REPRODUCER_DISABLE_CAPTURE=1 not %lldb --replay %t/bogus/bogus 2>&1 | FileCheck %s --check-prefix INVALID-REPLAY
3+
# RUN: not %lldb --capture --capture-path %t/bogus/bogus 2>&1 | FileCheck %s --check-prefix INVALID-CAPTURE
4+
# RUN: not %lldb --replay %t/bogus/bogus 2>&1 | FileCheck %s --check-prefix INVALID-REPLAY
55
#
66
# INVALID-CAPTURE: unable to create reproducer directory
77
# INVALID-REPLAY: unable to load reproducer index
88

99
# Check that all option combination work as expected.
1010
#
11-
# RUN: env LLDB_REPRODUCER_DISABLE_CAPTURE=1 %lldb --capture --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
12-
# RUN: env LLDB_REPRODUCER_DISABLE_CAPTURE=1 %lldb --capture -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
13-
# RUN: env LLDB_REPRODUCER_DISABLE_CAPTURE=1 %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE
11+
# RUN: %lldb --capture --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
12+
# RUN: %lldb --capture -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
13+
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE
1414
#
1515
# NO-WARNING-NOT: warning: -capture-path specified without -capture
1616
# WARNING: warning: -capture-path specified without -capture

lldb/tools/driver/Driver.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -806,17 +806,10 @@ llvm::Optional<int> InitializeReproducer(opt::InputArgList &input_args) {
806806
}
807807
return 0;
808808
}
809-
810-
bool capture = input_args.hasArg(OPT_capture);
811-
auto *capture_path = input_args.getLastArg(OPT_capture_path);
812-
813809
// BEGIN SWIFT
814-
if (!getenv("LLDB_REPRODUCER_DISABLE_CAPTURE")) {
815-
// Always enable capture unless explicitly disabled by the
816-
// LLDB_REPRODUCER_DISABLE_CAPTURE environment variable.
817-
capture = true;
818-
}
810+
bool capture = true; // input_args.hasArg(OPT_capture);
819811
// END SWIFT
812+
auto *capture_path = input_args.getLastArg(OPT_capture_path);
820813

821814
if (capture || capture_path) {
822815
if (capture_path) {

0 commit comments

Comments
 (0)