File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,9 @@ class Generator final {
234
234
// / Enable or disable auto generate.
235
235
void SetAutoGenerate (bool b);
236
236
237
+ // / Return whether auto generate is enabled.
238
+ bool IsAutoGenerate () const ;
239
+
237
240
// / Create and register a new provider.
238
241
template <typename T> T *Create () {
239
242
std::unique_ptr<ProviderBase> provider = std::make_unique<T>(m_root);
Original file line number Diff line number Diff line change @@ -258,6 +258,18 @@ class CommandObjectReproducerStatus : public CommandObjectParsed {
258
258
result.GetOutputStream () << " Reproducer is off.\n " ;
259
259
}
260
260
261
+ if (r.IsCapturing () || r.IsReplaying ()) {
262
+ result.GetOutputStream ()
263
+ << " Path: " << r.GetReproducerPath ().GetPath () << ' \n ' ;
264
+ }
265
+
266
+ // Auto generate is hidden unless enabled because this is mostly for
267
+ // development and testing.
268
+ if (Generator *g = r.GetGenerator ()) {
269
+ if (g->IsAutoGenerate ())
270
+ result.GetOutputStream () << " Auto generate: on\n " ;
271
+ }
272
+
261
273
result.SetStatus (eReturnStatusSuccessFinishResult);
262
274
return result.Succeeded ();
263
275
}
Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ void Generator::Discard() {
205
205
206
206
void Generator::SetAutoGenerate (bool b) { m_auto_generate = b; }
207
207
208
+ bool Generator::IsAutoGenerate () const { return m_auto_generate; }
209
+
208
210
const FileSpec &Generator::GetRoot () const { return m_root; }
209
211
210
212
void Generator::AddProvidersToIndex () {
Original file line number Diff line number Diff line change 10
10
#
11
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
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
13
+ # RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE --check-prefix NOAUTOGEN
14
14
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-auto-generate 2>&1 | FileCheck %s --check-prefix WARNING2
15
15
#
16
16
# NO-WARNING-NOT: warning: -capture-path specified without -capture
17
17
# WARNING: warning: -capture-path specified without -capture
18
18
# WARNING2: warning: -reproducer-auto-generate specified without -capture
19
19
# STATUS-CAPTURE: Reproducer is in capture mode.
20
+ # NOAUTOGEN-NOT: Auto generate
20
21
21
22
# Check auto generate.
22
23
# RUN: rm -rf %t.repro
23
- # RUN: %lldb --capture --capture-path %t.repro -b --reproducer-auto-generate -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING
24
+ # 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
24
25
# RUN: cat %t.repro/index.yaml
26
+ # AUTOGEN: Auto generate: on
You can’t perform that action at this time.
0 commit comments