diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2010-10-10 22:52:19 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2010-10-10 22:52:19 +0000 |
commit | 8f2ae10cf97ea7e5d51d947081db1be2e82f70ed (patch) | |
tree | 0445dd9ca4fdd7e8d153fa2a3cbb4af2f68f9421 /generic/pg-autotest.el | |
parent | 99aaca98a009a75a0fcba5c67bd0eef79e9dbaf2 (diff) |
Add a master debug flag, and disable debug output ordinarily.
Diffstat (limited to 'generic/pg-autotest.el')
-rw-r--r-- | generic/pg-autotest.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/pg-autotest.el b/generic/pg-autotest.el index fe0c2074..0ac4477a 100644 --- a/generic/pg-autotest.el +++ b/generic/pg-autotest.el @@ -24,6 +24,8 @@ (require 'proof-shell) (require 'proof-utils) +(defconst pg-autotest-debug nil) ; run in debug mode or not + ;;; Code: @@ -33,14 +35,14 @@ (defvar pg-autotest-log t "Value for 'standard-output' during tests.") -(setq debug-on-error t) ;; enable in case a test goes wrong -(setq proof-general-debug t) ;; debug messages from PG - -(defadvice proof-debug (before proof-debug-to-log (msg &rest args)) - "Output the debug message to the test log." - (apply 'pg-autotest-message msg args)) +(when pg-autotest-debug + (setq debug-on-error t) ;; enable in case a test goes wrong + (setq proof-general-debug t) ;; debug messages from PG -(ad-activate 'proof-debug) + (defadvice proof-debug (before proof-debug-to-log (msg &rest args)) + "Output the debug message to the test log." + (apply 'pg-autotest-message msg args)) + (ad-activate 'proof-debug)) ;;; Some utilities |