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

65 lines
1.5 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
2008-04-11 15:43:26 -04:00
namespaces continuations layouts accessors ;
2008-03-14 18:39:57 -04:00
: shake-and-bake ( vocab -- )
2008-03-27 12:48:51 -04:00
[ "test.image" temp-file delete-file ] ignore-errors
"resource:" [
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 size>> r> <= ;
2008-03-14 18:39:57 -04:00
[ ] [ "hello-world" shake-and-bake ] unit-test
[ t ] [
2008-03-30 01:13:53 -04:00
cell 8 = 8 5 ? 100000 * small-enough?
] unit-test
[ ] [ "sudoku" shake-and-bake ] unit-test
[ t ] [
cell 8 = 20 10 ? 100000 * 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-04-06 02:51:04 -04:00
cell 8 = 40 20 ? 100000 * small-enough?
] unit-test
[ ] [ "maze" shake-and-bake ] unit-test
[ t ] [
cell 8 = 30 15 ? 100000 * small-enough?
] unit-test
[ ] [ "bunny" shake-and-bake ] unit-test
[ t ] [
2008-04-06 02:51:04 -04:00
cell 8 = 50 30 ? 100000 * small-enough?
] unit-test
2008-06-18 23:29:48 -04:00
{
"tools.deploy.test.1"
"tools.deploy.test.2"
"tools.deploy.test.3"
"tools.deploy.test.4"
} [
[ ] swap [
shake-and-bake
vm
"-i=" "test.image" temp-file append
2array try-process
] curry unit-test
] each