Mercurial > hg > xemacs-beta
comparison lisp/build-report.el @ 2976:0fb57d74601d
[xemacs-hg @ 2005-10-05 04:11:24 by stephent]
Synch build-report.el to build package version
<87ek70txjo.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Wed, 05 Oct 2005 04:11:25 +0000 |
parents | 151d438d2d55 |
children | dcfb8ec6859a |
comparison
equal
deleted
inserted
replaced
2975:4db88a5a5096 | 2976:0fb57d74601d |
---|---|
1 ;;; build-report.el --- Automatically formatted build reports for XEmacs | 1 ;;; build-report.el --- Automatically formatted build reports for XEmacs |
2 | 2 |
3 ;; Copyright (C) 1997-2001 Adrian Aichner | 3 ;; Copyright (C) 1997-2003 Adrian Aichner |
4 | 4 |
5 ;; Author: Adrian Aichner <adrian@xemacs.org> | 5 ;; Author: Adrian Aichner <adrian@xemacs.org> |
6 ;; Date: $Date: 2005/10/05 04:11:25 $ | |
7 ;; Version: $Revision: 1.12 $ | |
6 ;; Keywords: internal | 8 ;; Keywords: internal |
7 | 9 |
8 ;; This file is part of XEmacs. | 10 ;; This file is part of XEmacs. |
9 | 11 |
10 ;; XEmacs is free software; you can redistribute it and/or modify | 12 ;; XEmacs is free software; you can redistribute it and/or modify |
64 | 66 |
65 (defconst build-report-version-file-regexp | 67 (defconst build-report-version-file-regexp |
66 "emacs_major_version\\s-*=\\s-*\\([0-9]+\\) | 68 "emacs_major_version\\s-*=\\s-*\\([0-9]+\\) |
67 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\) | 69 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\) |
68 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)? | 70 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)? |
69 xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\" | 71 xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\"\\( |
70 xemacs_extra_name\\s-*=\\s-*\"\\([^\"]+\\)\"" | 72 xemacs_extra_name\\s-*=\\s-*\"\\([^\"]+\\)\"\\)?" |
71 "*REGEXP matching XEmacs Beta Version variable assignments in | 73 "*REGEXP matching XEmacs Beta Version variable assignments in |
72 `build-report-version-file' file. This variable is used by | 74 `build-report-version-file' file. This variable is used by |
73 `build-report-version-file-data'.") | 75 `build-report-version-file-data'.") |
74 | 76 |
75 (defconst build-report-installation-srcdir-regexp | 77 (defconst build-report-installation-srcdir-regexp |
111 "not\\s-+found" | 113 "not\\s-+found" |
112 "^While\\s-+compiling.*\\(\n\\s-+.+\\)*" | 114 "^While\\s-+compiling.*\\(\n\\s-+.+\\)*" |
113 "^Note:" | 115 "^Note:" |
114 "Installing" | 116 "Installing" |
115 "[Ff]ile(s) copied" | 117 "[Ff]ile(s) copied" |
116 "\\s-+tests\\s-+") | 118 "\\s-+tests\\s-+" |
119 "^[A-Z] [^ ]+$" | |
120 "^Wrong number of arguments:" | |
121 "^ \\*\\* " | |
122 "^\\(FAIL\\|SKIP\\):") | |
117 "*Regexp of make process output lines to keep in the report." | 123 "*Regexp of make process output lines to keep in the report." |
118 :type '(repeat | 124 :type '(repeat |
119 :custom-show t | 125 :custom-show t |
120 :documentation-shown t | 126 :documentation-shown t |
121 regexp) | 127 regexp) |
123 | 129 |
124 (defcustom build-report-delete-regexp | 130 (defcustom build-report-delete-regexp |
125 (list | 131 (list |
126 "confl.*with.*auto-inlining" | 132 "confl.*with.*auto-inlining" |
127 "^Formatting:" | 133 "^Formatting:" |
134 "^\\s-*0 .*\\(failure\\|error\\)s?" | |
135 "^PASS:" | |
128 "(100%) tests successful") | 136 "(100%) tests successful") |
129 "*Regexp of make process output lines to delete from the report." | 137 "*Regexp of make process output lines to delete from the report." |
130 :type '(repeat | 138 :type '(repeat |
131 :custom-show t | 139 :custom-show t |
132 :documentation-shown t | 140 :documentation-shown t |
196 :type 'boolean | 204 :type 'boolean |
197 :group 'build-report) | 205 :group 'build-report) |
198 | 206 |
199 (defcustom build-report-subject | 207 (defcustom build-report-subject |
200 (concat "[%s] " emacs-version " on " system-configuration) | 208 (concat "[%s] " emacs-version " on " system-configuration) |
209 ;; #### this should allow variable names which will be evalled and | |
210 ;; formatted using %s, see `build-report-prompts' | |
201 "*XEmacs Build Report Subject Line. %s-sequences will be substituted | 211 "*XEmacs Build Report Subject Line. %s-sequences will be substituted |
202 with user input through `build-report' according to | 212 with user input through `build-report' according to |
203 `build-report-prompts' using `format'." | 213 `build-report-prompts' using `format'." |
204 :type '(string | 214 :type '(string |
205 :custom-show t | 215 :custom-show t |
206 :documentation-shown t) | 216 :documentation-shown t) |
207 :group 'build-report) | 217 :group 'build-report) |
208 | 218 |
209 (defcustom build-report-prompts | 219 (defcustom build-report-prompts |
210 (quote (("Status?: " ("Success" "Failure")))) | 220 (quote (("Status?: " ("Success" "Failure")))) |
221 ;; #### this should allow variable names which will be evalled and | |
222 ;; formatted using %s, see `build-report-prompts' | |
211 "*XEmacs Build Report Prompt(s). This is a list of prompt-string | 223 "*XEmacs Build Report Prompt(s). This is a list of prompt-string |
212 lists used by `build-report' in conjunction with | 224 lists used by `build-report' in conjunction with |
213 `build-report-subject'. Each list consists of a prompt string | 225 `build-report-subject'. Each list consists of a prompt string |
214 followed by any number of strings which can be chosen via the history | 226 followed by any number of strings which can be chosen via the history |
215 mechanism." | 227 mechanism." |
246 (unless (fboundp 'mime-edit-insert-binary-file) | 258 (unless (fboundp 'mime-edit-insert-binary-file) |
247 (defalias 'mime-edit-insert-binary-file | 259 (defalias 'mime-edit-insert-binary-file |
248 'mime-editor/insert-binary-file))) | 260 'mime-editor/insert-binary-file))) |
249 | 261 |
250 (defun build-report-make-output-get () | 262 (defun build-report-make-output-get () |
251 "Returns the filename the XEmacs make output is saved in." | 263 "Return the filename the XEmacs make output is saved in." |
252 (interactive) | 264 (interactive) |
253 (if (or (string-equal build-report-make-output-dir "") | 265 (if (or (string-equal build-report-make-output-dir "") |
254 (null build-report-make-output-dir)) | 266 (null build-report-make-output-dir)) |
255 (mapcar | 267 (mapcar |
256 (function | 268 (function |
310 (if (file-exists-p build-report-installation-file) | 322 (if (file-exists-p build-report-installation-file) |
311 (multiple-value-bind | 323 (multiple-value-bind |
312 (major minor beta codename extraname configuration) | 324 (major minor beta codename extraname configuration) |
313 (build-report-installation-data build-report-installation-file) | 325 (build-report-installation-data build-report-installation-file) |
314 (setq build-report-subject | 326 (setq build-report-subject |
315 (format "[%%s] XEmacs %s.%s%s \"%s\" %s %s" | 327 (format "[%%s] XEmacs %s.%s%s \"%s\" %s%s" |
316 major minor beta codename extraname configuration))) | 328 major minor beta codename extraname configuration))) |
317 (multiple-value-bind | 329 (multiple-value-bind |
318 (major minor beta codename extraname) | 330 (major minor beta codename extraname) |
319 (build-report-version-file-data build-report-version-file) | 331 (build-report-version-file-data build-report-version-file) |
320 (setq build-report-subject | 332 (setq build-report-subject |
321 (format "[%%s] XEmacs %s.%s%s \"%s\" %s %s" | 333 (format "[%%s] XEmacs %s.%s%s \"%s\" %s%s" |
322 major minor beta codename extraname system-configuration)))) | 334 major minor beta codename extraname system-configuration)))) |
323 (compose-mail | 335 (compose-mail |
324 ;; `build-report-destination' used to be a single string, so | 336 ;; `build-report-destination' used to be a single string, so |
325 ;; let's test if we really get a list of destinations. | 337 ;; let's test if we really get a list of destinations. |
326 (if (listp build-report-destination) | 338 (if (listp build-report-destination) |
499 (goto-char (point-min)) | 511 (goto-char (point-min)) |
500 (while (< (point) (point-max)) | 512 (while (< (point) (point-max)) |
501 (cond | 513 (cond |
502 ((looking-at build-report-installation-version-regexp) | 514 ((looking-at build-report-installation-version-regexp) |
503 (goto-char (match-end 0)) | 515 (goto-char (match-end 0)) |
504 (setq major (match-string 1)) | 516 (setq major (or (match-string 1) "")) |
505 (setq minor (match-string 2)) | 517 (setq minor (or (match-string 2) "")) |
506 (setq beta (match-string 3)) | 518 (setq beta (or (match-string 3) "")) |
507 (setq codename (match-string 6)) | 519 (setq codename (or (match-string 6) "")) |
508 (setq extraname (match-string 7)) | 520 (setq extraname (or (match-string 7) "")) |
509 (setq configuration (match-string 8))) | 521 (setq configuration (or (match-string 8) ""))) |
510 ((looking-at build-report-installation-srcdir-regexp) | 522 ((looking-at build-report-installation-srcdir-regexp) |
511 (goto-char (match-end 0)) | 523 (goto-char (match-end 0)) |
512 (setq srcdir (match-string 1))) | 524 (setq srcdir (or (match-string 1) ""))) |
513 ;; We avoid matching a potentially zero-length string to avoid | 525 ;; We avoid matching a potentially zero-length string to avoid |
514 ;; infinite looping. | 526 ;; infinite looping. |
515 ((looking-at | 527 ((looking-at |
516 "^.+$") | 528 "^.+$") |
517 (goto-char (match-end 0))) | 529 (goto-char (match-end 0))) |
533 (goto-char (point-min)) | 545 (goto-char (point-min)) |
534 (while (< (point) (point-max)) | 546 (while (< (point) (point-max)) |
535 (cond | 547 (cond |
536 ((looking-at build-report-version-file-regexp) | 548 ((looking-at build-report-version-file-regexp) |
537 (goto-char (match-end 0)) | 549 (goto-char (match-end 0)) |
538 (setq major (match-string 1)) | 550 (setq major (or (match-string 1) "")) |
539 (setq minor (match-string 2)) | 551 (setq minor (or (match-string 2) "")) |
540 (setq beta (match-string 3)) | 552 (setq beta (or (match-string 3) "")) |
541 (setq codename (match-string 4)) | 553 (setq codename (or (match-string 4) "")) |
542 (setq extraname (match-string 5))) | 554 (setq extraname (or (match-string 6) ""))) |
543 ;; We avoid matching a potentially zero-length string to avoid | 555 ;; We avoid matching a potentially zero-length string to avoid |
544 ;; infinite looping. | 556 ;; infinite looping. |
545 ((looking-at | 557 ((looking-at |
546 "^.+$") | 558 "^.+$") |
547 (goto-char (match-end 0))) | 559 (goto-char (match-end 0))) |