428
|
1 ;; test-harness.el --- Run Emacs Lisp test suites.
|
|
2
|
|
3 ;;; Copyright (C) 1998 Free Software Foundation, Inc.
|
826
|
4 ;;; Copyright (C) 2002 Ben Wing.
|
428
|
5
|
|
6 ;; Author: Martin Buchholz
|
|
7 ;; Keywords: testing
|
|
8
|
|
9 ;; This file is part of XEmacs.
|
|
10
|
|
11 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
12 ;; under the terms of the GNU General Public License as published by
|
|
13 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
14 ;; any later version.
|
|
15
|
|
16 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19 ;; General Public License for more details.
|
|
20
|
|
21 ;; You should have received a copy of the GNU General Public License
|
|
22 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
24 ;; Boston, MA 02111-1307, USA.
|
|
25
|
|
26 ;;; Synched up with: Not in FSF.
|
|
27
|
|
28 ;;; Commentary:
|
|
29
|
|
30 ;;; A test suite harness for testing XEmacs.
|
|
31 ;;; The actual tests are in other files in this directory.
|
|
32 ;;; Basically you just create files of emacs-lisp, and use the
|
1095
|
33 ;;; Assert, Check-Error, Check-Message, and Check-Error-Message functions
|
|
34 ;;; to create tests. See `test-harness-from-buffer' below.
|
|
35 ;;; Don't suppress tests just because they're due to known bugs not yet
|
1413
|
36 ;;; fixed -- use the Known-Bug-Expect-Failure and
|
|
37 ;;; Implementation-Incomplete-Expect-Failure wrapper macros to mark them.
|
1095
|
38 ;;; A lot of the tests we run push limits; suppress Ebola message with the
|
|
39 ;;; Ignore-Ebola wrapper macro.
|
|
40 ;;;
|
428
|
41 ;;; You run the tests using M-x test-emacs-test-file,
|
|
42 ;;; or $(EMACS) -batch -l .../test-harness.el -f batch-test-emacs file ...
|
|
43 ;;; which is run for you by the `make check' target in the top-level Makefile.
|
|
44
|
|
45 (require 'bytecomp)
|
|
46
|
|
47 (defvar test-harness-verbose
|
|
48 (and (not noninteractive) (> (device-baud-rate) search-slow-speed))
|
|
49 "*Non-nil means print messages describing progress of emacs-tester.")
|
|
50
|
1719
|
51 (defvar test-harness-file-results-alist nil
|
|
52 "Each element is a list (FILE SUCCESSES TESTS).
|
|
53 The order is the reverse of the order in which tests are run.
|
|
54
|
|
55 FILE is a string naming the test file.
|
|
56 SUCCESSES is a non-negative integer, the number of successes.
|
|
57 TESTS is a non-negative integer, the number of tests run.")
|
|
58
|
1425
|
59 (defvar test-harness-risk-infloops nil
|
|
60 "*Non-nil to run tests that may loop infinitely in buggy implementations.")
|
|
61
|
428
|
62 (defvar test-harness-current-file nil)
|
|
63
|
|
64 (defvar emacs-lisp-file-regexp (purecopy "\\.el\\'")
|
|
65 "*Regexp which matches Emacs Lisp source files.")
|
|
66
|
|
67 ;;;###autoload
|
|
68 (defun test-emacs-test-file (filename)
|
|
69 "Test a file of Lisp code named FILENAME.
|
|
70 The output file's name is made by appending `c' to the end of FILENAME."
|
|
71 (interactive
|
|
72 (let ((file buffer-file-name)
|
|
73 (file-name nil)
|
|
74 (file-dir nil))
|
|
75 (and file
|
|
76 (eq (cdr (assq 'major-mode (buffer-local-variables)))
|
|
77 'emacs-lisp-mode)
|
|
78 (setq file-name (file-name-nondirectory file)
|
|
79 file-dir (file-name-directory file)))
|
|
80 (list (read-file-name "Test file: " file-dir nil nil file-name))))
|
|
81 ;; Expand now so we get the current buffer's defaults
|
|
82 (setq filename (expand-file-name filename))
|
|
83
|
|
84 ;; If we're testing a file that's in a buffer and is modified, offer
|
|
85 ;; to save it first.
|
|
86 (or noninteractive
|
|
87 (let ((b (get-file-buffer (expand-file-name filename))))
|
|
88 (if (and b (buffer-modified-p b)
|
|
89 (y-or-n-p (format "save buffer %s first? " (buffer-name b))))
|
|
90 (save-excursion (set-buffer b) (save-buffer)))))
|
|
91
|
|
92 (if (or noninteractive test-harness-verbose)
|
|
93 (message "Testing %s..." filename))
|
|
94 (let ((test-harness-current-file filename)
|
|
95 input-buffer)
|
|
96 (save-excursion
|
|
97 (setq input-buffer (get-buffer-create " *Test Input*"))
|
|
98 (set-buffer input-buffer)
|
|
99 (erase-buffer)
|
|
100 (insert-file-contents filename)
|
|
101 ;; Run hooks including the uncompression hook.
|
|
102 ;; If they change the file name, then change it for the output also.
|
|
103 (let ((buffer-file-name filename)
|
|
104 (default-major-mode 'emacs-lisp-mode)
|
|
105 (enable-local-eval nil))
|
|
106 (normal-mode)
|
|
107 (setq filename buffer-file-name)))
|
|
108 (test-harness-from-buffer input-buffer filename)
|
|
109 (kill-buffer input-buffer)
|
|
110 ))
|
|
111
|
|
112 (defun test-harness-read-from-buffer (buffer)
|
|
113 "Read forms from BUFFER, and turn it into a lambda test form."
|
|
114 (let ((body nil))
|
|
115 (goto-char (point-min) buffer)
|
|
116 (condition-case error-info
|
|
117 (while t
|
|
118 (setq body (cons (read buffer) body)))
|
|
119 (end-of-file nil)
|
|
120 (error
|
928
|
121 (princ (format "Unexpected error %S reading forms from buffer\n" error-info))))
|
428
|
122 `(lambda ()
|
|
123 (defvar passes)
|
|
124 (defvar assertion-failures)
|
|
125 (defvar no-error-failures)
|
|
126 (defvar wrong-error-failures)
|
|
127 (defvar missing-message-failures)
|
|
128 (defvar other-failures)
|
|
129
|
|
130 (defvar unexpected-test-suite-failure)
|
|
131 (defvar trick-optimizer)
|
|
132
|
|
133 ,@(nreverse body))))
|
|
134
|
|
135 (defun test-harness-from-buffer (inbuffer filename)
|
|
136 "Run tests in buffer INBUFFER, visiting FILENAME."
|
|
137 (defvar trick-optimizer)
|
|
138 (let ((passes 0)
|
|
139 (assertion-failures 0)
|
|
140 (no-error-failures 0)
|
|
141 (wrong-error-failures 0)
|
|
142 (missing-message-failures 0)
|
|
143 (other-failures 0)
|
|
144
|
973
|
145 ;; #### perhaps this should be a defvar, and output at the very end
|
|
146 ;; OTOH, this way AC types can use a null EMACSPACKAGEPATH to find
|
|
147 ;; what stuff is needed, and ways to avoid using them
|
|
148 (skipped-test-reasons (make-hash-table :test 'equal))
|
|
149
|
428
|
150 (trick-optimizer nil)
|
|
151 (unexpected-test-suite-failure nil)
|
826
|
152 (debug-on-error t)
|
|
153 (pass-stream nil))
|
428
|
154 (with-output-to-temp-buffer "*Test-Log*"
|
826
|
155 (princ (format "Testing %s...\n\n" filename))
|
1095
|
156
|
1413
|
157 (defconst test-harness-failure-tag "FAIL")
|
|
158 (defconst test-harness-success-tag "PASS")
|
1095
|
159
|
|
160 (defmacro Known-Bug-Expect-Failure (&rest body)
|
1413
|
161 `(let ((test-harness-failure-tag "KNOWN BUG")
|
|
162 (test-harness-success-tag "PASS (FAILURE EXPECTED)"))
|
|
163 ,@body))
|
|
164
|
|
165 (defmacro Implementation-Incomplete-Expect-Failure (&rest body)
|
|
166 `(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE")
|
|
167 (test-harness-success-tag "PASS (FAILURE EXPECTED)"))
|
|
168 ,@body))
|
826
|
169
|
|
170 (defun Print-Failure (fmt &rest args)
|
1413
|
171 (setq fmt (format "%s: %s" test-harness-failure-tag fmt))
|
826
|
172 (if (noninteractive) (apply #'message fmt args))
|
|
173 (princ (concat (apply #'format fmt args) "\n")))
|
|
174
|
|
175 (defun Print-Pass (fmt &rest args)
|
1413
|
176 (setq fmt (format "%s: %s" test-harness-success-tag fmt))
|
826
|
177 (and test-harness-verbose
|
|
178 (princ (concat (apply #'format fmt args) "\n"))))
|
|
179
|
973
|
180 (defun Print-Skip (test reason &optional fmt &rest args)
|
1095
|
181 (setq fmt (concat "SKIP: %S BECAUSE %S" fmt))
|
973
|
182 (princ (concat (apply #'format fmt test reason args) "\n")))
|
|
183
|
1095
|
184 (defmacro Skip-Test-Unless (condition reason description &rest body)
|
|
185 "Unless CONDITION is satisfied, skip test BODY.
|
|
186 REASON is a description of the condition failure, and must be unique (it
|
|
187 is used as a hash key). DESCRIPTION describes the tests that were skipped.
|
|
188 BODY is a sequence of expressions and may contain several tests."
|
|
189 `(if (not ,condition)
|
|
190 (let ((count (gethash ,reason skipped-test-reasons)))
|
|
191 (puthash ,reason (if (null count) 1 (1+ count))
|
|
192 skipped-test-reasons)
|
|
193 (Print-Skip ,description ,reason))
|
|
194 ,@body))
|
428
|
195
|
|
196 (defmacro Assert (assertion)
|
|
197 `(condition-case error-info
|
|
198 (progn
|
|
199 (assert ,assertion)
|
826
|
200 (Print-Pass "%S" (quote ,assertion))
|
428
|
201 (incf passes))
|
|
202 (cl-assertion-failed
|
826
|
203 (Print-Failure "Assertion failed: %S" (quote ,assertion))
|
428
|
204 (incf assertion-failures))
|
826
|
205 (t (Print-Failure "%S ==> error: %S" (quote ,assertion) error-info)
|
428
|
206 (incf other-failures)
|
|
207 )))
|
|
208
|
|
209 (defmacro Check-Error (expected-error &rest body)
|
|
210 (let ((quoted-body (if (= 1 (length body))
|
|
211 `(quote ,(car body)) `(quote (progn ,@body)))))
|
|
212 `(condition-case error-info
|
|
213 (progn
|
|
214 (setq trick-optimizer (progn ,@body))
|
826
|
215 (Print-Failure "%S executed successfully, but expected error %S"
|
428
|
216 ,quoted-body
|
826
|
217 ',expected-error)
|
428
|
218 (incf no-error-failures))
|
|
219 (,expected-error
|
826
|
220 (Print-Pass "%S ==> error %S, as expected"
|
|
221 ,quoted-body ',expected-error)
|
428
|
222 (incf passes))
|
|
223 (error
|
826
|
224 (Print-Failure "%S ==> expected error %S, got error %S instead"
|
|
225 ,quoted-body ',expected-error error-info)
|
428
|
226 (incf wrong-error-failures)))))
|
|
227
|
826
|
228 (defmacro Check-Error-Message (expected-error expected-error-regexp
|
|
229 &rest body)
|
428
|
230 (let ((quoted-body (if (= 1 (length body))
|
|
231 `(quote ,(car body)) `(quote (progn ,@body)))))
|
|
232 `(condition-case error-info
|
|
233 (progn
|
|
234 (setq trick-optimizer (progn ,@body))
|
826
|
235 (Print-Failure "%S executed successfully, but expected error %S"
|
|
236 ,quoted-body ',expected-error)
|
428
|
237 (incf no-error-failures))
|
|
238 (,expected-error
|
|
239 (let ((error-message (second error-info)))
|
|
240 (if (string-match ,expected-error-regexp error-message)
|
|
241 (progn
|
826
|
242 (Print-Pass "%S ==> error %S %S, as expected"
|
|
243 ,quoted-body error-message ',expected-error)
|
428
|
244 (incf passes))
|
826
|
245 (Print-Failure "%S ==> got error %S as expected, but error message %S did not match regexp %S"
|
|
246 ,quoted-body ',expected-error error-message ,expected-error-regexp)
|
428
|
247 (incf wrong-error-failures))))
|
|
248 (error
|
826
|
249 (Print-Failure "%S ==> expected error %S, got error %S instead"
|
|
250 ,quoted-body ',expected-error error-info)
|
428
|
251 (incf wrong-error-failures)))))
|
|
252
|
|
253
|
|
254 (defmacro Check-Message (expected-message-regexp &rest body)
|
1095
|
255 (Skip-Test-Unless (fboundp 'defadvice)
|
|
256 "can't defadvice"
|
|
257 expected-message-regexp
|
973
|
258 (let ((quoted-body (if (= 1 (length body))
|
|
259 `(quote ,(car body))
|
|
260 `(quote (progn ,@body)))))
|
|
261 `(let ((messages ""))
|
|
262 (defadvice message (around collect activate)
|
|
263 (defvar messages)
|
|
264 (let ((msg-string (apply 'format (ad-get-args 0))))
|
|
265 (setq messages (concat messages msg-string))
|
|
266 msg-string))
|
|
267 (condition-case error-info
|
|
268 (progn
|
|
269 (setq trick-optimizer (progn ,@body))
|
|
270 (if (string-match ,expected-message-regexp messages)
|
|
271 (progn
|
|
272 (Print-Pass "%S ==> value %S, message %S, matching %S, as expected"
|
|
273 ,quoted-body trick-optimizer messages ',expected-message-regexp)
|
|
274 (incf passes))
|
|
275 (Print-Failure "%S ==> value %S, message %S, NOT matching expected %S"
|
|
276 ,quoted-body trick-optimizer messages
|
|
277 ',expected-message-regexp)
|
|
278 (incf missing-message-failures)))
|
|
279 (error
|
|
280 (Print-Failure "%S ==> unexpected error %S"
|
|
281 ,quoted-body error-info)
|
|
282 (incf other-failures)))
|
|
283 (ad-unadvise 'message)))))
|
428
|
284
|
|
285 (defmacro Ignore-Ebola (&rest body)
|
|
286 `(let ((debug-issue-ebola-notices -42)) ,@body))
|
|
287
|
|
288 (defun Int-to-Marker (pos)
|
|
289 (save-excursion
|
|
290 (set-buffer standard-output)
|
|
291 (save-excursion
|
|
292 (goto-char pos)
|
|
293 (point-marker))))
|
|
294
|
|
295 (princ "Testing Interpreted Lisp\n\n")
|
|
296 (condition-case error-info
|
|
297 (funcall (test-harness-read-from-buffer inbuffer))
|
|
298 (error
|
|
299 (setq unexpected-test-suite-failure t)
|
|
300 (princ (format "Unexpected error %S while executing interpreted code\n"
|
|
301 error-info))
|
|
302 (message "Unexpected error %S while executing interpreted code." error-info)
|
|
303 (message "Test suite execution aborted." error-info)
|
|
304 ))
|
|
305 (princ "\nTesting Compiled Lisp\n\n")
|
|
306 (let (code)
|
|
307 (condition-case error-info
|
446
|
308 (setq code
|
|
309 ;; our lisp code is often intentionally dubious,
|
|
310 ;; so throw away _all_ the byte compiler warnings.
|
|
311 (letf (((symbol-function 'byte-compile-warn) 'ignore))
|
|
312 (byte-compile (test-harness-read-from-buffer inbuffer))))
|
428
|
313 (error
|
|
314 (princ (format "Unexpected error %S while byte-compiling code\n"
|
|
315 error-info))))
|
|
316 (condition-case error-info
|
|
317 (if code (funcall code))
|
|
318 (error
|
|
319 (princ (format "Unexpected error %S while executing byte-compiled code\n"
|
|
320 error-info))
|
|
321 (message "Unexpected error %S while executing byte-compiled code." error-info)
|
|
322 (message "Test suite execution aborted." error-info)
|
|
323 )))
|
826
|
324 (princ (format "\nSUMMARY for %s:\n" filename))
|
428
|
325 (princ (format "\t%5d passes\n" passes))
|
|
326 (princ (format "\t%5d assertion failures\n" assertion-failures))
|
|
327 (princ (format "\t%5d errors that should have been generated, but weren't\n" no-error-failures))
|
|
328 (princ (format "\t%5d wrong-error failures\n" wrong-error-failures))
|
|
329 (princ (format "\t%5d missing-message failures\n" missing-message-failures))
|
|
330 (princ (format "\t%5d other failures\n" other-failures))
|
|
331 (let* ((total (+ passes
|
|
332 assertion-failures
|
|
333 no-error-failures
|
|
334 wrong-error-failures
|
|
335 missing-message-failures
|
|
336 other-failures))
|
|
337 (basename (file-name-nondirectory filename))
|
|
338 (summary-msg
|
|
339 (if (> total 0)
|
1231
|
340 (format "%s: %d of %d tests successful (%d%%)."
|
428
|
341 basename passes total (/ (* 100 passes) total))
|
973
|
342 (format "%s: No tests run" basename)))
|
|
343 (reasons ""))
|
|
344 (maphash (lambda (key value)
|
|
345 (setq reasons
|
|
346 (concat reasons
|
1095
|
347 (format "\n %d tests skipped because %s."
|
973
|
348 value key))))
|
|
349 skipped-test-reasons)
|
|
350 (when (> (length reasons) 1)
|
|
351 (setq summary-msg (concat summary-msg reasons "
|
|
352 Probably XEmacs cannot find your installed packages. Set EMACSPACKAGEPATH
|
|
353 to the package hierarchy root or configure with --package-path to enable
|
|
354 the skipped tests.")))
|
1719
|
355 (setq test-harness-file-results-alist
|
|
356 (cons (list filename passes total)
|
|
357 test-harness-file-results-alist))
|
428
|
358 (message "%s" summary-msg))
|
|
359 (when unexpected-test-suite-failure
|
|
360 (message "Test suite execution failed unexpectedly."))
|
|
361 (fmakunbound 'Assert)
|
|
362 (fmakunbound 'Check-Error)
|
863
|
363 (fmakunbound 'Check-Message)
|
|
364 (fmakunbound 'Check-Error-Message)
|
428
|
365 (fmakunbound 'Ignore-Ebola)
|
|
366 (fmakunbound 'Int-to-Marker)
|
1719
|
367 (and noninteractive
|
|
368 (message "%s" (buffer-substring-no-properties
|
|
369 nil nil "*Test-Log*"))))))
|
428
|
370
|
|
371 (defvar test-harness-results-point-max nil)
|
|
372 (defmacro displaying-emacs-test-results (&rest body)
|
|
373 `(let ((test-harness-results-point-max test-harness-results-point-max))
|
|
374 ;; Log the file name.
|
|
375 (test-harness-log-file)
|
|
376 ;; Record how much is logged now.
|
|
377 ;; We will display the log buffer if anything more is logged
|
|
378 ;; before the end of BODY.
|
|
379 (or test-harness-results-point-max
|
|
380 (save-excursion
|
|
381 (set-buffer (get-buffer-create "*Test-Log*"))
|
|
382 (setq test-harness-results-point-max (point-max))))
|
|
383 (unwind-protect
|
|
384 (condition-case error-info
|
|
385 (progn ,@body)
|
|
386 (error
|
|
387 (test-harness-report-error error-info)))
|
|
388 (save-excursion
|
|
389 ;; If there were compilation warnings, display them.
|
|
390 (set-buffer "*Test-Log*")
|
|
391 (if (= test-harness-results-point-max (point-max))
|
|
392 nil
|
|
393 (if temp-buffer-show-function
|
|
394 (let ((show-buffer (get-buffer-create "*Test-Log-Show*")))
|
|
395 (save-excursion
|
|
396 (set-buffer show-buffer)
|
|
397 (setq buffer-read-only nil)
|
|
398 (erase-buffer))
|
|
399 (copy-to-buffer show-buffer
|
|
400 (save-excursion
|
|
401 (goto-char test-harness-results-point-max)
|
|
402 (forward-line -1)
|
|
403 (point))
|
|
404 (point-max))
|
|
405 (funcall temp-buffer-show-function show-buffer))
|
|
406 (select-window
|
|
407 (prog1 (selected-window)
|
|
408 (select-window (display-buffer (current-buffer)))
|
|
409 (goto-char test-harness-results-point-max)
|
|
410 (recenter 1)))))))))
|
|
411
|
|
412 (defun batch-test-emacs-1 (file)
|
|
413 (condition-case error-info
|
|
414 (progn (test-emacs-test-file file) t)
|
|
415 (error
|
|
416 (princ ">>Error occurred processing ")
|
|
417 (princ file)
|
|
418 (princ ": ")
|
|
419 (display-error error-info nil)
|
|
420 (terpri)
|
|
421 nil)))
|
|
422
|
|
423 (defun batch-test-emacs ()
|
|
424 "Run `test-harness' on the files remaining on the command line.
|
|
425 Use this from the command line, with `-batch';
|
|
426 it won't work in an interactive Emacs.
|
|
427 Each file is processed even if an error occurred previously.
|
|
428 For example, invoke \"xemacs -batch -f batch-test-emacs tests/*.el\""
|
|
429 ;; command-line-args-left is what is left of the command line (from
|
|
430 ;; startup.el)
|
|
431 (defvar command-line-args-left) ;Avoid 'free variable' warning
|
|
432 (defvar debug-issue-ebola-notices)
|
|
433 (if (not noninteractive)
|
|
434 (error "`batch-test-emacs' is to be used only with -batch"))
|
|
435 (let ((error nil))
|
|
436 (dolist (file command-line-args-left)
|
|
437 (if (file-directory-p file)
|
|
438 (dolist (file-in-dir (directory-files file t))
|
|
439 (when (and (string-match emacs-lisp-file-regexp file-in-dir)
|
|
440 (not (or (auto-save-file-name-p file-in-dir)
|
|
441 (backup-file-name-p file-in-dir)
|
|
442 (equal (file-name-nondirectory file-in-dir)
|
|
443 "test-harness.el"))))
|
|
444 (or (batch-test-emacs-1 file-in-dir)
|
|
445 (setq error t))))
|
|
446 (or (batch-test-emacs-1 file)
|
|
447 (setq error t))))
|
1719
|
448 (let ((namelen 0)
|
|
449 (succlen 0)
|
|
450 (testlen 0)
|
|
451 (results test-harness-file-results-alist))
|
|
452 ;; compute maximum lengths of variable components of report
|
|
453 ;; probably should just use (length "byte-compiler-tests.el")
|
|
454 ;; and 5-place sizes -- this will also work for the file-by-file
|
|
455 ;; printing when Adrian's kludge gets reverted
|
|
456 (flet ((print-width (i)
|
|
457 (let ((x 10) (y 1))
|
|
458 (while (>= i x)
|
|
459 (setq x (* 10 x) y (1+ y)))
|
|
460 y)))
|
|
461 (while results
|
|
462 (let* ((head (car results))
|
|
463 (nn (length (file-name-nondirectory (first head))))
|
|
464 (ss (print-width (second head)))
|
|
465 (tt (print-width (third head))))
|
|
466 (when (> nn namelen) (setq namelen nn))
|
|
467 (when (> ss succlen) (setq succlen ss))
|
|
468 (when (> tt testlen) (setq testlen tt)))
|
|
469 (setq results (cdr results))))
|
|
470 ;; create format and print
|
|
471 (let ((template
|
|
472 (format "%%-%ds %%%dd of %%%dd tests successful (%%d%%%%)"
|
|
473 (1+ namelen) succlen testlen))
|
|
474 (results (reverse test-harness-file-results-alist)))
|
|
475 (while results
|
|
476 (let* ((head (car results))
|
|
477 (fname (file-name-nondirectory (first head)))
|
|
478 (nsucc (second head))
|
|
479 (ntest (third head)))
|
1722
|
480 (if (> ntest 0)
|
|
481 (message template
|
|
482 (concat fname ":")
|
|
483 nsucc
|
|
484 ntest
|
|
485 (/ (* 100 nsucc) ntest))
|
|
486 (message "%s: No tests run\n" fname))
|
1719
|
487 (setq results (cdr results))))))
|
|
488 (message "\nDone")
|
428
|
489 (kill-emacs (if error 1 0))))
|
|
490
|
|
491 (provide 'test-harness)
|
|
492
|
|
493 ;;; test-harness.el ends here
|