Update mason

db4
Slava Pestov 2009-04-14 16:37:33 -05:00
parent a881d803fc
commit 457b042b35
2 changed files with 20 additions and 15 deletions

View File

@ -87,9 +87,11 @@ CONSTANT: test-all-errors-file "test-all-errors"
CONSTANT: help-lint-vocabs-file "help-lint-vocabs" CONSTANT: help-lint-vocabs-file "help-lint-vocabs"
CONSTANT: help-lint-errors-file "help-lint-errors" CONSTANT: help-lint-errors-file "help-lint-errors"
CONSTANT: compiler-errors-file "compiler-errors"
CONSTANT: compiler-error-messages-file "compiler-error-messages"
CONSTANT: boot-time-file "boot-time" CONSTANT: boot-time-file "boot-time"
CONSTANT: load-time-file "load-time" CONSTANT: load-time-file "load-time"
CONSTANT: compiler-errors-file "compiler-errors"
CONSTANT: test-time-file "test-time" CONSTANT: test-time-file "test-time"
CONSTANT: help-lint-time-file "help-lint-time" CONSTANT: help-lint-time-file "help-lint-time"
CONSTANT: benchmark-time-file "benchmark-time" CONSTANT: benchmark-time-file "benchmark-time"

View File

@ -4,7 +4,7 @@ USING: accessors assocs benchmark bootstrap.stage2
compiler.errors generic help.html help.lint io.directories compiler.errors generic help.html help.lint io.directories
io.encodings.utf8 io.files kernel mason.common math namespaces io.encodings.utf8 io.files kernel mason.common math namespaces
prettyprint sequences sets sorting tools.test tools.time prettyprint sequences sets sorting tools.test tools.time
tools.vocabs words system io ; tools.vocabs words system io tools.errors locals ;
IN: mason.test IN: mason.test
: do-load ( -- ) : do-load ( -- )
@ -19,24 +19,27 @@ M: word word-vocabulary vocabulary>> ;
M: method-body word-vocabulary "method-generic" word-prop word-vocabulary ; M: method-body word-vocabulary "method-generic" word-prop word-vocabulary ;
:: do-step ( errors summary-file details-file -- )
errors [ file>> ] map prune natural-sort summary-file to-file
errors details-file utf8 [ errors. ] with-file-writer ;
: do-compile-errors ( -- ) : do-compile-errors ( -- )
compiler-errors-file utf8 [ compiler-errors get values
+error+ errors-of-type keys compiler-error-messages-file
[ word-vocabulary ] map compiler-errors-file
prune natural-sort . do-step ;
] with-file-writer ;
: do-tests ( -- ) : do-tests ( -- )
run-all-tests test-all test-failures get
[ keys test-all-vocabs-file to-file ] test-all-vocabs-file
[ test-all-errors-file utf8 [ test-failures. ] with-file-writer ] test-all-errors-file
bi ; do-step ;
: do-help-lint ( -- ) : do-help-lint ( -- )
"" run-help-lint help-lint-all lint-failures get values
[ keys help-lint-vocabs-file to-file ] help-lint-vocabs-file
[ help-lint-errors-file utf8 [ typos. ] with-file-writer ] help-lint-errors-file
bi ; do-step ;
: do-benchmarks ( -- ) : do-benchmarks ( -- )
run-benchmarks benchmarks-file to-file ; run-benchmarks benchmarks-file to-file ;