builder: only email the last 100 lines of the test-log

db4
Eduardo Cavazos 2008-02-19 16:45:19 -06:00
parent a647a02737
commit 6281e0a95d
2 changed files with 17 additions and 2 deletions

View File

@ -137,7 +137,7 @@ SYMBOL: build-status
bootstrap [ "Bootstrap error" print "../boot-log" cat ] run-or-bail
builder-test [ "Test error" print "../test-log" cat ] run-or-bail
builder-test [ "Test error" print "../test-log" 100 cat-n ] run-or-bail
"../test-log" delete-file

View File

@ -83,4 +83,19 @@ TUPLE: process* arguments stdin stdout stderr timeout ;
USING: bootstrap.image bootstrap.image.download io.streams.null ;
: retrieve-image ( -- ) [ my-arch download-image ] with-null-stream ;
: retrieve-image ( -- ) [ my-arch download-image ] with-null-stream ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: longer? ( seq seq -- ? ) [ length ] 2apply > ;
: maybe-tail* ( seq n -- seq )
2dup longer?
[ tail* ]
[ drop ]
if ;
: cat-n ( file n -- )
[ file-lines ] [ ] bi*
maybe-tail*
[ print ] each ;