]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/deploy/test/test.factor
Merge branch 'master' into experimental
[factor.git] / basis / tools / deploy / test / test.factor
1 USING: accessors arrays continuations io.directories io.files.info
2 io.files.temp io.launcher kernel layouts math sequences system
3 tools.deploy.backend tools.deploy.config.editor ;
4 IN: tools.deploy.test
5
6 : shake-and-bake ( vocab -- )
7     [ "test.image" temp-file delete-file ] ignore-errors
8     "resource:" [
9         [ vm "test.image" temp-file ] dip
10         dup deploy-config make-deploy-image
11     ] with-directory ;
12
13 : small-enough? ( n -- ? )
14     [ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;
15
16 : run-temp-image ( -- )
17     vm
18     "-i=" "test.image" temp-file append
19     2array try-process ;