simplify builder.test

db4
Eduardo Cavazos 2008-02-07 18:30:20 -06:00
parent b08409884e
commit a2e6c37213
2 changed files with 38 additions and 19 deletions

View File

@ -1,8 +1,8 @@
USING: kernel io io.files io.launcher hashtables tools.deploy.backend
USING: kernel io io.files io.launcher hashtables
system continuations namespaces sequences splitting math.parser
prettyprint tools.time calendar bake vars http.client
combinators ;
combinators bootstrap.image ;
IN: builder
@ -82,6 +82,11 @@ VAR: stamp
]
if
{
"git" "pull" "--no-summary"
"http://dharmatech.onigirihouse.com/factor.git" "master"
} run-process process-status
"/builds/" stamp> append make-directory
"/builds/" stamp> append cd

View File

@ -7,28 +7,42 @@ USING: kernel sequences assocs builder continuations vocabs vocabs.loader
IN: builder.test
! : do-load ( -- )
! [
! [ load-everything ]
! [ require-all-error-vocabs "../load-everything-log" log-object ]
! recover
! ]
! "../load-everything-time" log-runtime ;
: do-load ( -- )
[
[ load-everything ]
[ require-all-error-vocabs "../load-everything-log" log-object ]
recover
]
"../load-everything-time" log-runtime ;
[ try-everything ] "../load-everything-time" log-runtime
dup empty?
[ drop ]
[ "../load-everything-log" log-object ]
if ;
! : do-tests ( -- )
! "" child-vocabs
! [ vocab-source-loaded? ] subset
! [ vocab-tests-path ] map
! [ dup [ ?resource-path exists? ] when ] subset
! [ dup run-test ] { } map>assoc
! [ second empty? not ] subset
! dup empty?
! [ drop ]
! [
! "../failing-tests" <file-writer>
! [ [ nl failures. ] assoc-each ]
! with-stream
! ]
! if ;
: do-tests ( -- )
"" child-vocabs
[ vocab-source-loaded? ] subset
[ vocab-tests-path ] map
[ dup [ ?resource-path exists? ] when ] subset
[ dup run-test ] { } map>assoc
[ second empty? not ] subset
run-all-tests keys
dup empty?
[ drop ]
[
"../failing-tests" <file-writer>
[ [ nl failures. ] assoc-each ]
with-stream
]
[ "../failing-tests" log-object ]
if ;
: do-all ( -- ) do-load do-tests ;