From 8f2ae10cf97ea7e5d51d947081db1be2e82f70ed Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Sun, 10 Oct 2010 22:52:19 +0000 Subject: Add a master debug flag, and disable debug output ordinarily. --- generic/pg-autotest.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'generic/pg-autotest.el') 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 -- cgit v1.2.3