Skip to content

Commit 66158c6

Browse files
Support the --bug-report and --no-bug-report options in kore-repl (#2462)
* Support --bug-report and --no-bug-report in kore-repl kore-repl generated bug reports without allowing the user to specify how or if this needs to be done. Make it behave like kore-exec. * include.mk: Run kore-repl with --no-bug-report Prevent integration tests that use kore-repl from producing bug reports. This already applies for kore-exec.
1 parent 57ad329 commit 66158c6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

include.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export KORE_EXEC
4444
export KORE_EXEC_OPTS
4545

4646
KORE_REPL = $(BUILD_DIR)/kore/bin/kore-repl
47-
KORE_REPL_OPTS =
47+
KORE_REPL_OPTS = --no-bug-report
4848
export KORE_REPL
4949
export KORE_REPL_OPTS
5050

kore/app/repl/Main.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ data KoreReplOptions = KoreReplOptions
8080
, replScript :: !ReplScript
8181
, outputFile :: !OutputFile
8282
, koreLogOptions :: !KoreLogOptions
83+
, bugReportOption :: !BugReportOption
8384
}
8485

8586
-- | Parse options after being given the value of startTime for KoreLogOptions
@@ -94,6 +95,7 @@ parseKoreReplOptions startTime =
9495
<*> parseReplScript
9596
<*> parseOutputFile
9697
<*> parseKoreLogOptions (ExeName "kore-repl") startTime
98+
<*> parseBugReportOption
9799
where
98100
parseMainModule :: Parser KoreModule
99101
parseMainModule =
@@ -185,10 +187,11 @@ mainWithOptions
185187
, scriptModeOutput
186188
, outputFile
187189
, koreLogOptions
190+
, bugReportOption
188191
}
189192
= do
190193
exitCode <-
191-
withBugReport Main.exeName BugReportOnError $ \tempDirectory ->
194+
withBugReport Main.exeName bugReportOption $ \tempDirectory ->
192195
withLogger tempDirectory koreLogOptions $ \actualLogAction -> do
193196
mvarLogAction <- newMVar actualLogAction
194197
let swapLogAction = swappableLogger mvarLogAction

0 commit comments

Comments
 (0)