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 ;
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" ] [
"hello-ui" deploy-config
[ bootstrap-profile staging-image-name file-name ] bind
] 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? [
[ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
[ ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
] 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"

View File

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