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

54 lines
1.2 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
tools.deploy.backend math sequences io.launcher arrays
namespaces ;
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" ] [
2008-03-20 22:35:01 -04:00
"hello-ui" deploy-config
[ bootstrap-profile staging-image-name file-name ] bind
2008-03-19 15:39:08 -04:00
] 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