2008-03-01 17:00:45 -05:00
|
|
|
IN: tools.deploy.tests
|
2008-02-28 02:21:30 -05:00
|
|
|
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-02-28 02:21:30 -05:00
|
|
|
|
2008-03-14 18:39:57 -04:00
|
|
|
: shake-and-bake ( vocab -- )
|
2008-02-28 02:21:30 -05:00
|
|
|
"." resource-path [
|
2008-03-14 18:39:57 -04:00
|
|
|
>r vm
|
2008-03-13 04:46:25 -04:00
|
|
|
"test.image" temp-file
|
2008-03-14 18:39:57 -04:00
|
|
|
r> dup deploy-config make-deploy-image
|
2008-02-28 02:21:30 -05:00
|
|
|
] with-directory ;
|
|
|
|
|
2008-03-14 18:39:57 -04:00
|
|
|
: small-enough? ( n -- ? )
|
|
|
|
>r "test.image" temp-file file-info file-info-size r> <= ;
|
|
|
|
|
2008-02-28 02:21:30 -05:00
|
|
|
[ ] [ "hello-world" shake-and-bake ] unit-test
|
|
|
|
|
|
|
|
[ t ] [
|
2008-03-14 18:39:57 -04:00
|
|
|
500000 small-enough?
|
2008-02-28 02:21:30 -05:00
|
|
|
] unit-test
|
|
|
|
|
2008-03-13 04:46:25 -04:00
|
|
|
[ ] [ "sudoku" shake-and-bake ] unit-test
|
|
|
|
|
|
|
|
[ t ] [
|
2008-03-14 18:39:57 -04:00
|
|
|
1500000 small-enough?
|
2008-03-13 04:46:25 -04:00
|
|
|
] unit-test
|
|
|
|
|
2008-02-28 02:21:30 -05:00
|
|
|
[ ] [ "hello-ui" shake-and-bake ] unit-test
|
|
|
|
|
|
|
|
[ t ] [
|
2008-03-14 18:39:57 -04:00
|
|
|
2000000 small-enough?
|
2008-02-28 02:21:30 -05:00
|
|
|
] unit-test
|
2008-03-13 04:46:25 -04:00
|
|
|
|
|
|
|
[ ] [ "bunny" shake-and-bake ] unit-test
|
|
|
|
|
|
|
|
[ t ] [
|
2008-03-14 18:39:57 -04:00
|
|
|
3000000 small-enough?
|
2008-03-13 04:46:25 -04:00
|
|
|
] 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
|
2008-03-13 04:46:25 -04:00
|
|
|
] 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
|
2008-03-13 04:46:25 -04:00
|
|
|
] unit-test
|