From e47c30bf431f3c8160b41384eedb538ba16578d0 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Fri, 29 May 2015 15:41:15 +0200 Subject: Flag -test-mode intended to be used for ad-hoc prints in test-suite Of course there is an exception to the previous commit. Fail used to print even if silenced but loading a vernac file. This behavior is useful only in tests, hence this flag. --- toplevel/coqtop.ml | 1 + toplevel/vernacentries.ml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'toplevel') diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 826381028..81e04525c 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -499,6 +499,7 @@ let parse_args arglist = |"-async-proofs-never-reopen-branch" -> Flags.async_proofs_never_reopen_branch := true; |"-batch" -> set_batch_mode () + |"-test-mode" -> test_mode := true |"-beautify" -> make_beautify true |"-boot" -> boot := true; no_load_rc () |"-bt" -> Backtrace.record_backtrace true diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index 61ebc9bbe..188d2d098 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -2118,7 +2118,7 @@ let with_fail b f = | HasNotFailed -> errorlabstrm "Fail" (str "The command has not failed!") | HasFailed msg -> - if is_verbose () || !Flags.ide_slave then msg_info + if is_verbose () || !test_mode || !ide_slave then msg_info (str "The command has indeed failed with message:" ++ fnl () ++ msg) | _ -> assert false end -- cgit v1.2.3