builder.*: update for new code changes

db4
Eduardo Cavazos 2008-03-07 08:52:23 -06:00
parent 9910de0439
commit 93950e7d7a
3 changed files with 29 additions and 29 deletions

View File

@ -2,6 +2,7 @@
USING: kernel namespaces sequences splitting system combinators continuations USING: kernel namespaces sequences splitting system combinators continuations
parser io io.files io.launcher io.sockets prettyprint threads parser io io.files io.launcher io.sockets prettyprint threads
bootstrap.image benchmark vars bake smtp builder.util accessors bootstrap.image benchmark vars bake smtp builder.util accessors
io.encodings.utf8
calendar calendar
builder.common builder.common
builder.benchmark builder.benchmark
@ -35,20 +36,20 @@ IN: builder
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: git-id ( -- id ) : git-id ( -- id )
{ "git" "show" } <process-stream> [ readln ] with-stream " " split second ; { "git" "show" } utf8 <process-stream>
[ readln ] with-stream " " split second ;
: record-git-id ( -- ) git-id "../git-id" [ . ] with-file-writer ; : record-git-id ( -- ) git-id "../git-id" utf8 [ . ] with-file-writer ;
: do-make-clean ( -- ) { "make" "clean" } try-process ; : do-make-clean ( -- ) { "make" "clean" } try-process ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: make-vm ( -- desc ) : make-vm ( -- desc )
<process*> <process>
{ "make" } >>arguments { "make" } >>command
"../compile-log" >>stdout "../compile-log" >>stdout
+stdout+ >>stderr +stdout+ >>stderr ;
>desc ;
: do-make-vm ( -- ) : do-make-vm ( -- )
make-vm [ "vm compile error" print "../compile-log" cat ] run-or-bail ; make-vm [ "vm compile error" print "../compile-log" cat ] run-or-bail ;
@ -65,13 +66,12 @@ IN: builder
{ "./factor" { "-i=" my-boot-image-name } "-no-user-init" } to-strings ; { "./factor" { "-i=" my-boot-image-name } "-no-user-init" } to-strings ;
: bootstrap ( -- desc ) : bootstrap ( -- desc )
<process*> <process>
bootstrap-cmd >>arguments bootstrap-cmd >>command
+closed+ >>stdin +closed+ >>stdin
"../boot-log" >>stdout "../boot-log" >>stdout
+stdout+ >>stderr +stdout+ >>stderr
20 minutes >>timeout 20 minutes >>timeout ;
>desc ;
: do-bootstrap ( -- ) : do-bootstrap ( -- )
bootstrap [ "Bootstrap error" print "../boot-log" cat ] run-or-bail ; bootstrap [ "Bootstrap error" print "../boot-log" cat ] run-or-bail ;
@ -80,13 +80,12 @@ IN: builder
{ "./factor" "-run=builder.test" } to-strings ; { "./factor" "-run=builder.test" } to-strings ;
: builder-test ( -- desc ) : builder-test ( -- desc )
<process*> <process>
builder-test-cmd >>arguments builder-test-cmd >>command
+closed+ >>stdin +closed+ >>stdin
"../test-log" >>stdout "../test-log" >>stdout
+stdout+ >>stderr +stdout+ >>stderr
45 minutes >>timeout 45 minutes >>timeout ;
>desc ;
: do-builder-test ( -- ) : do-builder-test ( -- )
builder-test [ "Test error" print "../test-log" 100 cat-n ] run-or-bail ; builder-test [ "Test error" print "../test-log" 100 cat-n ] run-or-bail ;

View File

@ -19,7 +19,7 @@ IN: builder.release
{ {
"boot.x86.32.image" "boot.x86.32.image"
"boot.x86.64.image" "boot.x86.64.image"
"boot.macosx-ppc.boot" "boot.macosx-ppc.image"
"vm" "vm"
"temp" "temp"
"logs" "logs"

View File

@ -4,6 +4,7 @@ USING: kernel words namespaces classes parser continuations
math math.parser math math.parser
combinators sequences splitting quotations arrays strings tools.time combinators sequences splitting quotations arrays strings tools.time
sequences.deep new-slots accessors assocs.lib sequences.deep new-slots accessors assocs.lib
io.encodings.utf8
combinators.cleave bake calendar calendar.format ; combinators.cleave bake calendar calendar.format ;
IN: builder.util IN: builder.util
@ -14,7 +15,7 @@ IN: builder.util
: minutes>ms ( min -- ms ) 60 * 1000 * ; : minutes>ms ( min -- ms ) 60 * 1000 * ;
: file>string ( file -- string ) [ stdio get contents ] with-file-reader ; : file>string ( file -- string ) utf8 [ stdio get contents ] with-file-reader ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -39,18 +40,18 @@ DEFER: to-strings
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
TUPLE: process* arguments stdin stdout stderr timeout ; ! TUPLE: process* arguments stdin stdout stderr timeout ;
: <process*> process* construct-empty ; ! : <process*> process* construct-empty ;
: >desc ( process* -- desc ) ! : >desc ( process* -- desc )
H{ } clone ! H{ } clone
over arguments>> [ +arguments+ swap put-at ] when* ! over arguments>> [ +arguments+ swap put-at ] when*
over stdin>> [ +stdin+ swap put-at ] when* ! over stdin>> [ +stdin+ swap put-at ] when*
over stdout>> [ +stdout+ swap put-at ] when* ! over stdout>> [ +stdout+ swap put-at ] when*
over stderr>> [ +stderr+ swap put-at ] when* ! over stderr>> [ +stderr+ swap put-at ] when*
over timeout>> [ +timeout+ swap put-at ] when* ! over timeout>> [ +timeout+ swap put-at ] when*
nip ; ! nip ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -71,7 +72,7 @@ TUPLE: process* arguments stdin stdout stderr timeout ;
: eval-file ( file -- obj ) file-contents eval ; : eval-file ( file -- obj ) file-contents eval ;
: cat ( file -- ) file-contents print ; : cat ( file -- ) utf8 file-contents print ;
: run-or-bail ( desc quot -- ) : run-or-bail ( desc quot -- )
[ [ try-process ] curry ] [ [ try-process ] curry ]
@ -96,7 +97,7 @@ USING: bootstrap.image bootstrap.image.download io.streams.null ;
if ; if ;
: cat-n ( file n -- ) : cat-n ( file n -- )
[ file-lines ] [ ] bi* [ utf8 file-lines ] [ ] bi*
maybe-tail* maybe-tail*
[ print ] each ; [ print ] each ;
@ -104,7 +105,7 @@ USING: bootstrap.image bootstrap.image.download io.streams.null ;
USE: prettyprint USE: prettyprint
: to-file ( object file -- ) [ . ] with-file-writer ; : to-file ( object file -- ) utf8 [ . ] with-file-writer ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!