builder.*: update for new code changes
parent
9910de0439
commit
93950e7d7a
|
@ -2,6 +2,7 @@
|
|||
USING: kernel namespaces sequences splitting system combinators continuations
|
||||
parser io io.files io.launcher io.sockets prettyprint threads
|
||||
bootstrap.image benchmark vars bake smtp builder.util accessors
|
||||
io.encodings.utf8
|
||||
calendar
|
||||
builder.common
|
||||
builder.benchmark
|
||||
|
@ -35,20 +36,20 @@ IN: builder
|
|||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
: 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 ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
: make-vm ( -- desc )
|
||||
<process*>
|
||||
{ "make" } >>arguments
|
||||
<process>
|
||||
{ "make" } >>command
|
||||
"../compile-log" >>stdout
|
||||
+stdout+ >>stderr
|
||||
>desc ;
|
||||
+stdout+ >>stderr ;
|
||||
|
||||
: do-make-vm ( -- )
|
||||
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 ;
|
||||
|
||||
: bootstrap ( -- desc )
|
||||
<process*>
|
||||
bootstrap-cmd >>arguments
|
||||
<process>
|
||||
bootstrap-cmd >>command
|
||||
+closed+ >>stdin
|
||||
"../boot-log" >>stdout
|
||||
+stdout+ >>stderr
|
||||
20 minutes >>timeout
|
||||
>desc ;
|
||||
20 minutes >>timeout ;
|
||||
|
||||
: do-bootstrap ( -- )
|
||||
bootstrap [ "Bootstrap error" print "../boot-log" cat ] run-or-bail ;
|
||||
|
@ -80,13 +80,12 @@ IN: builder
|
|||
{ "./factor" "-run=builder.test" } to-strings ;
|
||||
|
||||
: builder-test ( -- desc )
|
||||
<process*>
|
||||
builder-test-cmd >>arguments
|
||||
<process>
|
||||
builder-test-cmd >>command
|
||||
+closed+ >>stdin
|
||||
"../test-log" >>stdout
|
||||
+stdout+ >>stderr
|
||||
45 minutes >>timeout
|
||||
>desc ;
|
||||
45 minutes >>timeout ;
|
||||
|
||||
: do-builder-test ( -- )
|
||||
builder-test [ "Test error" print "../test-log" 100 cat-n ] run-or-bail ;
|
||||
|
|
|
@ -19,7 +19,7 @@ IN: builder.release
|
|||
{
|
||||
"boot.x86.32.image"
|
||||
"boot.x86.64.image"
|
||||
"boot.macosx-ppc.boot"
|
||||
"boot.macosx-ppc.image"
|
||||
"vm"
|
||||
"temp"
|
||||
"logs"
|
||||
|
|
|
@ -4,6 +4,7 @@ USING: kernel words namespaces classes parser continuations
|
|||
math math.parser
|
||||
combinators sequences splitting quotations arrays strings tools.time
|
||||
sequences.deep new-slots accessors assocs.lib
|
||||
io.encodings.utf8
|
||||
combinators.cleave bake calendar calendar.format ;
|
||||
|
||||
IN: builder.util
|
||||
|
@ -14,7 +15,7 @@ IN: builder.util
|
|||
|
||||
: 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 )
|
||||
H{ } clone
|
||||
over arguments>> [ +arguments+ swap put-at ] when*
|
||||
over stdin>> [ +stdin+ swap put-at ] when*
|
||||
over stdout>> [ +stdout+ swap put-at ] when*
|
||||
over stderr>> [ +stderr+ swap put-at ] when*
|
||||
over timeout>> [ +timeout+ swap put-at ] when*
|
||||
nip ;
|
||||
! : >desc ( process* -- desc )
|
||||
! H{ } clone
|
||||
! over arguments>> [ +arguments+ swap put-at ] when*
|
||||
! over stdin>> [ +stdin+ swap put-at ] when*
|
||||
! over stdout>> [ +stdout+ swap put-at ] when*
|
||||
! over stderr>> [ +stderr+ swap put-at ] when*
|
||||
! over timeout>> [ +timeout+ swap put-at ] when*
|
||||
! nip ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
@ -71,7 +72,7 @@ TUPLE: process* arguments stdin stdout stderr timeout ;
|
|||
|
||||
: eval-file ( file -- obj ) file-contents eval ;
|
||||
|
||||
: cat ( file -- ) file-contents print ;
|
||||
: cat ( file -- ) utf8 file-contents print ;
|
||||
|
||||
: run-or-bail ( desc quot -- )
|
||||
[ [ try-process ] curry ]
|
||||
|
@ -96,7 +97,7 @@ USING: bootstrap.image bootstrap.image.download io.streams.null ;
|
|||
if ;
|
||||
|
||||
: cat-n ( file n -- )
|
||||
[ file-lines ] [ ] bi*
|
||||
[ utf8 file-lines ] [ ] bi*
|
||||
maybe-tail*
|
||||
[ print ] each ;
|
||||
|
||||
|
@ -104,7 +105,7 @@ USING: bootstrap.image bootstrap.image.download io.streams.null ;
|
|||
|
||||
USE: prettyprint
|
||||
|
||||
: to-file ( object file -- ) [ . ] with-file-writer ;
|
||||
: to-file ( object file -- ) utf8 [ . ] with-file-writer ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
|
Loading…
Reference in New Issue