More deployment fixes
parent
f1ba5e8368
commit
f1cadef89d
|
@ -1,14 +1,14 @@
|
|||
USING: tools.deploy.config ;
|
||||
H{
|
||||
{ deploy-io 2 }
|
||||
{ deploy-math? f }
|
||||
{ deploy-threads? f }
|
||||
{ deploy-compiler? f }
|
||||
{ deploy-word-props? f }
|
||||
{ deploy-word-defs? f }
|
||||
{ deploy-name "Hello world (console)" }
|
||||
{ deploy-reflection 2 }
|
||||
{ deploy-threads? f }
|
||||
{ deploy-c-types? f }
|
||||
{ deploy-compiler? f }
|
||||
{ deploy-ui? f }
|
||||
{ deploy-math? f }
|
||||
{ deploy-reflection 1 }
|
||||
{ deploy-word-defs? f }
|
||||
{ deploy-io 2 }
|
||||
{ deploy-word-props? f }
|
||||
{ "stop-after-last-window?" t }
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
USING: tools.deploy.config ;
|
||||
H{
|
||||
{ deploy-reflection 2 }
|
||||
{ deploy-word-props? f }
|
||||
{ deploy-compiler? t }
|
||||
{ deploy-math? f }
|
||||
{ deploy-c-types? f }
|
||||
{ deploy-io 2 }
|
||||
{ deploy-ui? f }
|
||||
{ deploy-name "Sudoku" }
|
||||
{ "stop-after-last-window?" t }
|
||||
{ deploy-threads? f }
|
||||
{ deploy-c-types? f }
|
||||
{ deploy-compiler? t }
|
||||
{ deploy-ui? f }
|
||||
{ deploy-math? f }
|
||||
{ deploy-reflection 1 }
|
||||
{ deploy-word-defs? f }
|
||||
{ deploy-io 2 }
|
||||
{ deploy-word-props? f }
|
||||
{ "stop-after-last-window?" t }
|
||||
}
|
||||
|
|
|
@ -65,8 +65,12 @@ IN: tools.deploy.backend
|
|||
: run-factor ( vm flags -- )
|
||||
swap add* dup . run-with-output ; inline
|
||||
|
||||
: make-staging-image ( vm config -- )
|
||||
staging-command-line run-factor ;
|
||||
: make-staging-image ( config -- )
|
||||
vm swap staging-command-line run-factor ;
|
||||
|
||||
: ?make-staging-image ( config -- )
|
||||
dup [ staging-image-name ] bind exists?
|
||||
[ drop ] [ make-staging-image ] if ;
|
||||
|
||||
: deploy-command-line ( image vocab config -- flags )
|
||||
[
|
||||
|
@ -85,9 +89,7 @@ IN: tools.deploy.backend
|
|||
|
||||
: make-deploy-image ( vm image vocab config -- )
|
||||
make-boot-image
|
||||
dup staging-image-name exists? [
|
||||
>r pick r> tuck make-staging-image
|
||||
] unless
|
||||
dup ?make-staging-image
|
||||
deploy-command-line run-factor ;
|
||||
|
||||
SYMBOL: deploy-implementation
|
||||
|
|
|
@ -1,44 +1,47 @@
|
|||
IN: tools.deploy.tests
|
||||
USING: tools.test system io.files kernel tools.deploy.config
|
||||
tools.deploy.backend math sequences io.launcher ;
|
||||
tools.deploy.backend math sequences io.launcher arrays ;
|
||||
|
||||
: shake-and-bake
|
||||
: shake-and-bake ( vocab -- )
|
||||
"." resource-path [
|
||||
vm
|
||||
>r vm
|
||||
"test.image" temp-file
|
||||
rot dup deploy-config make-deploy-image
|
||||
r> dup deploy-config make-deploy-image
|
||||
] with-directory ;
|
||||
|
||||
: small-enough? ( n -- ? )
|
||||
>r "test.image" temp-file file-info file-info-size r> <= ;
|
||||
|
||||
[ ] [ "hello-world" shake-and-bake ] unit-test
|
||||
|
||||
[ t ] [
|
||||
"hello.image" temp-file file-info file-info-size 500000 <=
|
||||
500000 small-enough?
|
||||
] unit-test
|
||||
|
||||
[ ] [ "sudoku" shake-and-bake ] unit-test
|
||||
|
||||
[ t ] [
|
||||
"hello.image" temp-file file-info file-info-size 1500000 <=
|
||||
1500000 small-enough?
|
||||
] unit-test
|
||||
|
||||
[ ] [ "hello-ui" shake-and-bake ] unit-test
|
||||
|
||||
[ t ] [
|
||||
"hello.image" temp-file file-info file-info-size 2000000 <=
|
||||
2000000 small-enough?
|
||||
] unit-test
|
||||
|
||||
[ ] [ "bunny" shake-and-bake ] unit-test
|
||||
|
||||
[ t ] [
|
||||
"hello.image" temp-file file-info file-info-size 3000000 <=
|
||||
3000000 small-enough?
|
||||
] unit-test
|
||||
|
||||
[ ] [
|
||||
"tools.deploy.test.1" shake-and-bake
|
||||
vm "-i=" "test.image" temp-file append try-process
|
||||
vm "-i=" "test.image" temp-file append 2array try-process
|
||||
] unit-test
|
||||
|
||||
[ ] [
|
||||
"tools.deploy.test.2" shake-and-bake
|
||||
vm "-i=" "test.image" temp-file append try-process
|
||||
vm "-i=" "test.image" temp-file append 2array try-process
|
||||
] unit-test
|
||||
|
|
|
@ -13,7 +13,6 @@ QUALIFIED: definitions
|
|||
QUALIFIED: init
|
||||
QUALIFIED: inspector
|
||||
QUALIFIED: io.backend
|
||||
QUALIFIED: io.nonblocking
|
||||
QUALIFIED: io.thread
|
||||
QUALIFIED: layouts
|
||||
QUALIFIED: libc.private
|
||||
|
@ -133,8 +132,10 @@ IN: tools.deploy.shaker
|
|||
|
||||
strip-io? [ io.backend:io-backend , ] when
|
||||
|
||||
{ io.backend:io-backend io.nonblocking:default-buffer-size }
|
||||
{ "alarms" "io" "tools" } strip-vocab-globals %
|
||||
[
|
||||
io.backend:io-backend
|
||||
"default-buffer-size" "io.nonblocking" lookup ,
|
||||
] { "alarms" "io" "tools" } strip-vocab-globals %
|
||||
|
||||
strip-dictionary? [
|
||||
{ } { "cpu" } strip-vocab-globals %
|
||||
|
|
Loading…
Reference in New Issue