tools.deploy.test: failing tests now have the actual and minimum size

db4
Slava Pestov 2009-11-14 02:01:23 -06:00
parent e32c167b7a
commit 78aa73b29e
2 changed files with 14 additions and 12 deletions

View File

@ -5,32 +5,32 @@ io.launcher arrays namespaces continuations layouts accessors
urls math.parser io.directories tools.deploy.test ; urls math.parser io.directories tools.deploy.test ;
IN: tools.deploy.tests IN: tools.deploy.tests
[ t ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test [ ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test
[ t ] [ "sudoku" shake-and-bake 800000 small-enough? ] unit-test [ ] [ "sudoku" shake-and-bake 800000 small-enough? ] unit-test
[ t ] [ "hello-ui" shake-and-bake 1300000 small-enough? ] unit-test [ ] [ "hello-ui" shake-and-bake 1300000 small-enough? ] unit-test
[ "staging.math-threads-compiler-ui.image" ] [ [ "staging.math-threads-compiler-ui.image" ] [
"hello-ui" deploy-config "hello-ui" deploy-config
[ bootstrap-profile staging-image-name file-name ] bind [ bootstrap-profile staging-image-name file-name ] bind
] unit-test ] unit-test
[ t ] [ "maze" shake-and-bake 1200000 small-enough? ] unit-test [ ] [ "maze" shake-and-bake 1200000 small-enough? ] unit-test
[ t ] [ "tetris" shake-and-bake 1500000 small-enough? ] unit-test [ ] [ "tetris" shake-and-bake 1500000 small-enough? ] unit-test
[ t ] [ "spheres" shake-and-bake 1500000 small-enough? ] unit-test [ ] [ "spheres" shake-and-bake 1500000 small-enough? ] unit-test
[ t ] [ "terrain" shake-and-bake 1700000 small-enough? ] unit-test [ ] [ "terrain" shake-and-bake 1700000 small-enough? ] unit-test
[ t ] [ "bunny" shake-and-bake 2500000 small-enough? ] unit-test [ ] [ "bunny" shake-and-bake 2500000 small-enough? ] unit-test
os macosx? [ os macosx? [
[ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test [ ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
] when ] when
[ t ] [ "benchmark.regex-dna" shake-and-bake 900000 small-enough? ] unit-test [ ] [ "benchmark.regex-dna" shake-and-bake 900000 small-enough? ] unit-test
{ {
"tools.deploy.test.1" "tools.deploy.test.1"

View File

@ -10,14 +10,16 @@ IN: tools.deploy.test
dup deploy-config make-deploy-image dup deploy-config make-deploy-image
] with-directory ; ] with-directory ;
: small-enough? ( n -- ? ) ERROR: image-too-big actual-size max-size ;
: small-enough? ( n -- )
[ "test.image" temp-file file-info size>> ] [ "test.image" temp-file file-info size>> ]
[ [
cell 4 / * cell 4 / *
cpu ppc? [ 100000 + ] when cpu ppc? [ 100000 + ] when
os windows? [ 150000 + ] when os windows? [ 150000 + ] when
] bi* ] bi*
<= ; 2dup <= [ 2drop ] [ image-too-big ] if ;
: deploy-test-command ( -- args ) : deploy-test-command ( -- args )
os macosx? os macosx?