[lldb/Reproducers] Rename developer-oriented reproducer flags.

This is a preparatory rename of the developer facing reproducer flags.

reproducer-skip-version-check -> reproducer-no-version-check
reproducer-auto-generate      -> reproducer-generate-on-quit
This commit is contained in:
Jonas Devlieghere 2020-07-09 10:35:16 -07:00
parent 7e169cec74
commit 84557c18b3
5 changed files with 15 additions and 15 deletions

View File

@ -11,16 +11,16 @@
# 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 --check-prefix NOAUTOGEN
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-auto-generate 2>&1 | FileCheck %s --check-prefix WARNING2
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-generate-on-exit 2>&1 | FileCheck %s --check-prefix WARNING2
#
# NO-WARNING-NOT: warning: -capture-path specified without -capture
# WARNING: warning: -capture-path specified without -capture
# WARNING2: warning: -reproducer-auto-generate specified without -capture
# WARNING2: warning: -reproducer-generate-on-exit specified without -capture
# STATUS-CAPTURE: Reproducer is in capture mode.
# NOAUTOGEN-NOT: Auto generate
# Check auto generate.
# RUN: rm -rf %t.repro
# RUN: %lldb --capture --capture-path %t.repro -b --reproducer-auto-generate -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix AUTOGEN
# RUN: %lldb --capture --capture-path %t.repro -b --reproducer-generate-on-exit -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix AUTOGEN
# RUN: cat %t.repro/index.yaml
# AUTOGEN: Auto generate: on

View File

@ -15,8 +15,8 @@
# Make sure that replay works.
# RUN: not %lldb --replay %t.repro 2>&1 | FileCheck %s --check-prefix ERROR
# Make sure that we can circumvent the version check with -reproducer-skip-version-check.
# RUN: %lldb --replay %t.repro -reproducer-skip-version-check | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
# Make sure that we can circumvent the version check with -reproducer-no-version-check.
# RUN: %lldb --replay %t.repro -reproducer-no-version-check | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
# CAPTURE: testing
# REPLAY-NOT: testing

View File

@ -799,9 +799,9 @@ EXAMPLES:
llvm::Optional<int> InitializeReproducer(opt::InputArgList &input_args) {
if (auto *replay_path = input_args.getLastArg(OPT_replay)) {
const bool skip_version_check = input_args.hasArg(OPT_skip_version_check);
const bool no_version_check = input_args.hasArg(OPT_no_version_check);
if (const char *error =
SBReproducer::Replay(replay_path->getValue(), skip_version_check)) {
SBReproducer::Replay(replay_path->getValue(), no_version_check)) {
WithColor::error() << "reproducer replay failed: " << error << '\n';
return 1;
}
@ -809,12 +809,12 @@ llvm::Optional<int> InitializeReproducer(opt::InputArgList &input_args) {
}
bool capture = input_args.hasArg(OPT_capture);
bool auto_generate = input_args.hasArg(OPT_auto_generate);
bool generate_on_exit = input_args.hasArg(OPT_generate_on_exit);
auto *capture_path = input_args.getLastArg(OPT_capture_path);
if (auto_generate && !capture) {
if (generate_on_exit && !capture) {
WithColor::warning()
<< "-reproducer-auto-generate specified without -capture\n";
<< "-reproducer-generate-on-exit specified without -capture\n";
}
if (capture || capture_path) {
@ -832,7 +832,7 @@ llvm::Optional<int> InitializeReproducer(opt::InputArgList &input_args) {
return 1;
}
}
if (auto_generate)
if (generate_on_exit)
SBReproducer::SetAutoGenerate(true);
}

View File

@ -232,9 +232,9 @@ def capture_path: Separate<["--", "-"], "capture-path">,
def replay: Separate<["--", "-"], "replay">,
MetaVarName<"<filename>">,
HelpText<"Tells the debugger to replay a reproducer from <filename>.">;
def skip_version_check: F<"reproducer-skip-version-check">,
HelpText<"Skip the reproducer version check.">;
def auto_generate: F<"reproducer-auto-generate">,
def no_version_check: F<"reproducer-no-version-check">,
HelpText<"Disable the reproducer version check.">;
def generate_on_exit: F<"reproducer-generate-on-exit">,
HelpText<"Generate reproducer on exit.">;
def REM : R<["--"], "">;

View File

@ -49,7 +49,7 @@ def main():
elif sys.argv[1] == "capture":
new_args.extend([
'--capture', '--capture-path', reproducer_path,
'--reproducer-auto-generate'
'--reproducer-generate-on-exit'
])
new_args.extend(sys.argv[2:])
else: