1 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel namespaces debugger fry io io.files io.sockets
4 io.encodings.utf8 prettyprint benchmark mason.common
5 mason.platform mason.config sequences ;
9 [ write ": " write ] [ eval-file milli-seconds>time print ] bi ;
11 : common-report ( -- )
12 "Build machine: " write host-name print
13 "CPU: " write target-cpu get print
14 "OS: " write target-os get print
15 "Build directory: " write build-dir print
16 "git id: " write "git-id" eval-file print nl ;
18 : with-report ( quot -- )
19 [ "report" utf8 ] dip '[ common-report @ ] with-file-writer ;
21 : compile-failed-report ( error -- )
23 "VM compile failed:" print nl
28 : boot-failed-report ( error -- )
30 "Bootstrap failed:" print nl
31 "boot-log" 100 cat-n nl
35 : test-failed-report ( error -- )
37 "Tests failed:" print nl
38 "test-log" 100 cat-n nl
42 : successful-report ( -- )
47 help-lint-time-file time.
48 benchmark-time-file time.
49 html-help-time-file time.
53 load-everything-vocabs-file eval-file [
54 "== Did not pass load-everything:" print .
55 load-everything-errors-file cat
58 compiler-errors-file eval-file [
59 "== Vocabularies with compiler errors:" print .
62 test-all-vocabs-file eval-file [
63 "== Did not pass test-all:" print .
64 test-all-errors-file cat
67 help-lint-vocabs-file eval-file [
68 "== Did not pass help-lint:" print .
69 help-lint-errors-file cat
72 "== Benchmarks:" print
73 benchmarks-file eval-file benchmarks.