Update mason
							parent
							
								
									a881d803fc
								
							
						
					
					
						commit
						457b042b35
					
				| 
						 | 
				
			
			@ -87,9 +87,11 @@ CONSTANT: test-all-errors-file "test-all-errors"
 | 
			
		|||
CONSTANT: help-lint-vocabs-file "help-lint-vocabs"
 | 
			
		||||
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: load-time-file "load-time"
 | 
			
		||||
CONSTANT: compiler-errors-file "compiler-errors"
 | 
			
		||||
CONSTANT: test-time-file "test-time"
 | 
			
		||||
CONSTANT: help-lint-time-file "help-lint-time"
 | 
			
		||||
CONSTANT: benchmark-time-file "benchmark-time"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@ USING: accessors assocs benchmark bootstrap.stage2
 | 
			
		|||
compiler.errors generic help.html help.lint io.directories
 | 
			
		||||
io.encodings.utf8 io.files kernel mason.common math namespaces
 | 
			
		||||
prettyprint sequences sets sorting tools.test tools.time
 | 
			
		||||
tools.vocabs words system io ;
 | 
			
		||||
tools.vocabs words system io tools.errors locals ;
 | 
			
		||||
IN: mason.test
 | 
			
		||||
 | 
			
		||||
: do-load ( -- )
 | 
			
		||||
| 
						 | 
				
			
			@ -19,24 +19,27 @@ M: word word-vocabulary 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 ( -- )
 | 
			
		||||
    compiler-errors-file utf8 [
 | 
			
		||||
        +error+ errors-of-type keys
 | 
			
		||||
        [ word-vocabulary ] map
 | 
			
		||||
        prune natural-sort .
 | 
			
		||||
    ] with-file-writer ;
 | 
			
		||||
    compiler-errors get values
 | 
			
		||||
    compiler-error-messages-file
 | 
			
		||||
    compiler-errors-file
 | 
			
		||||
    do-step ;
 | 
			
		||||
 | 
			
		||||
: do-tests ( -- )
 | 
			
		||||
    run-all-tests
 | 
			
		||||
    [ keys test-all-vocabs-file to-file ]
 | 
			
		||||
    [ test-all-errors-file utf8 [ test-failures. ] with-file-writer ]
 | 
			
		||||
    bi ;
 | 
			
		||||
    test-all test-failures get
 | 
			
		||||
    test-all-vocabs-file
 | 
			
		||||
    test-all-errors-file
 | 
			
		||||
    do-step ;
 | 
			
		||||
 | 
			
		||||
: do-help-lint ( -- )
 | 
			
		||||
    "" run-help-lint
 | 
			
		||||
    [ keys help-lint-vocabs-file to-file ]
 | 
			
		||||
    [ help-lint-errors-file utf8 [ typos. ] with-file-writer ]
 | 
			
		||||
    bi ;
 | 
			
		||||
    help-lint-all lint-failures get values
 | 
			
		||||
    help-lint-vocabs-file
 | 
			
		||||
    help-lint-errors-file
 | 
			
		||||
    do-step ;
 | 
			
		||||
 | 
			
		||||
: do-benchmarks ( -- )
 | 
			
		||||
    run-benchmarks benchmarks-file to-file ;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue