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