source: branches/1.1.x/tools/check.lisp

Last change on this file was 13941, checked in by Mark Evenson, 12 years ago

tools: Expand documentation for the bisect wrapper tool.

File size: 1.8 KB
Line 
1;;;; Run a bisection tool to determine where a test fails
2;;; This file is in the public domain.
3;;; Copyright (C) 2012 by Mark <evenson.not.org@gmail.com>
4(in-package :cl-user)
5
6(defun generate-bisect-wrapper ()
7  "Create 'check.sh', a script suitable for use with hg bisect.
8
9To use, first clone
10
11   hg clone https://evenson.not.org@code.google.com/p/abcl-dynamic-install/ ./abcl
12   cd abcl
13
14Then copy 'check.lisp' to this directory, as well as the bisect
15wrapper script 'check.sh'.  Adjust 'check.lisp' to raise an error if
16the problem exists in a given changeset.
17
18Then reset the hg bisection data via:
19
20   hg bisect --reset
21
22Mark the last known good and earliest known bad changeset via
23
24   hg bisect --good <revision>
25   hg bisect --bad <revision>
26
27Then issue
28
29   hg bisect --command sh ./check.sh
30
31which will churn through the revisions until it finds the earliest
32known version in which the 'check.lisp' raises the error.
33"
34  (let ((check.sh #p"check.sh"))
35    (unless (probe-file check.sh)
36      (with-open-file (output check.sh :direction :output)
37        (format output "#!/bin/sh~A~%"
38                "ant && ./abcl --noinit --batch --eval \"(load \\\"check.lisp\\\"")))))
39
40;;; XXX separate out runtime yucky top-level forms
41(require :asdf)
42(require :abcl-contrib)
43(require :asdf-install)  ;;; to push "~/.asdf-install-dir/systems/" into ASDF:*CENTRAL-REGISTRY*
44
45
46
47;;; The ASDF definition for ANSI-COMPILED contains the ANSI-TESTS package.
48;;; The CL-TEST package is defined by the GCL ANSI tests.
49(eval-when (:load-toplevel :execute)
50  (asdf:load-system :abcl)
51  (asdf:load-system :ansi-compiled)
52  (ansi-tests:load-tests)) ;; TODO figure out how to not load all the tests
53
54(defparameter *test*
55  'CL-TEST::SYNTAX.SHARP-BACKSLASH.7)
56
57(unless (rt:do-test *test*)
58  (error "~A failed" *test*))
59
60
61
Note: See TracBrowser for help on using the repository browser.