factor/extra/tools/deploy/deploy-tests.factor

52 lines
1.1 KiB
Factor
Raw Normal View History

2008-03-01 17:00:45 -05:00
IN: tools.deploy.tests
USING: tools.test system io.files kernel tools.deploy.config
2008-03-14 18:39:57 -04:00
tools.deploy.backend math sequences io.launcher arrays ;
2008-03-14 18:39:57 -04:00
: shake-and-bake ( vocab -- )
"." resource-path [
2008-03-14 18:39:57 -04:00
>r vm
"test.image" temp-file
2008-03-14 18:39:57 -04:00
r> dup deploy-config make-deploy-image
] with-directory ;
2008-03-14 18:39:57 -04:00
: small-enough? ( n -- ? )
>r "test.image" temp-file file-info file-info-size r> <= ;
[ ] [ "hello-world" shake-and-bake ] unit-test
[ t ] [
2008-03-14 18:39:57 -04:00
500000 small-enough?
] unit-test
[ ] [ "sudoku" shake-and-bake ] unit-test
[ t ] [
2008-03-14 18:39:57 -04:00
1500000 small-enough?
] unit-test
[ ] [ "hello-ui" shake-and-bake ] unit-test
2008-03-19 15:39:08 -04:00
[ "staging.math-compiler-ui-strip.image" ] [
"hello-ui" deploy-config [ staging-image-name ] bind
] unit-test
[ t ] [
2008-03-14 18:39:57 -04:00
2000000 small-enough?
] unit-test
[ ] [ "bunny" shake-and-bake ] unit-test
[ t ] [
2008-03-14 18:39:57 -04:00
3000000 small-enough?
] unit-test
[ ] [
"tools.deploy.test.1" shake-and-bake
2008-03-14 18:39:57 -04:00
vm "-i=" "test.image" temp-file append 2array try-process
] unit-test
[ ] [
"tools.deploy.test.2" shake-and-bake
2008-03-14 18:39:57 -04:00
vm "-i=" "test.image" temp-file append 2array try-process
] unit-test