Line endings

db4
Erik Charlebois 2010-02-16 10:33:19 -08:00
parent 550cd430f1
commit fcbeb3467d
1 changed files with 125 additions and 125 deletions

View File

@ -1,125 +1,125 @@
USING: tools.test system io io.encodings.ascii io.pathnames USING: tools.test system io io.encodings.ascii io.pathnames
io.files io.files.info io.files.temp kernel tools.deploy.config io.files io.files.info io.files.temp kernel tools.deploy.config
tools.deploy.config.editor tools.deploy.backend math sequences tools.deploy.config.editor tools.deploy.backend math sequences
io.launcher arrays namespaces continuations layouts accessors 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
[ ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test [ ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test
[ ] [ "sudoku" shake-and-bake 800000 small-enough? ] unit-test [ ] [ "sudoku" shake-and-bake 800000 small-enough? ] unit-test
[ ] [ "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
[ ] [ "maze" shake-and-bake 1200000 small-enough? ] unit-test [ ] [ "maze" shake-and-bake 1200000 small-enough? ] unit-test
[ ] [ "tetris" shake-and-bake 1500000 small-enough? ] unit-test [ ] [ "tetris" shake-and-bake 1500000 small-enough? ] unit-test
[ ] [ "spheres" shake-and-bake 1500000 small-enough? ] unit-test [ ] [ "spheres" shake-and-bake 1500000 small-enough? ] unit-test
[ ] [ "terrain" shake-and-bake 1700000 small-enough? ] unit-test [ ] [ "terrain" shake-and-bake 1700000 small-enough? ] unit-test
[ ] [ "bunny" shake-and-bake 2500000 small-enough? ] unit-test [ ] [ "bunny" shake-and-bake 2500000 small-enough? ] unit-test
os macosx? [ os macosx? [
[ ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test [ ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
] when ] when
[ ] [ "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"
"tools.deploy.test.2" "tools.deploy.test.2"
"tools.deploy.test.3" "tools.deploy.test.3"
"tools.deploy.test.4" "tools.deploy.test.4"
} [ } [
[ ] swap [ [ ] swap [
shake-and-bake shake-and-bake
run-temp-image run-temp-image
] curry unit-test ] curry unit-test
] each ] each
USING: http.client http.server http.server.dispatchers USING: http.client http.server http.server.dispatchers
http.server.responses http.server.static io.servers.connection ; http.server.responses http.server.static io.servers.connection ;
SINGLETON: quit-responder SINGLETON: quit-responder
M: quit-responder call-responder* M: quit-responder call-responder*
2drop stop-this-server "Goodbye" "text/html" <content> ; 2drop stop-this-server "Goodbye" "text/html" <content> ;
: add-quot-responder ( responder -- responder ) : add-quot-responder ( responder -- responder )
quit-responder "quit" add-responder ; quit-responder "quit" add-responder ;
: test-httpd ( responder -- ) : test-httpd ( responder -- )
[ [
main-responder set main-responder set
<http-server> <http-server>
0 >>insecure 0 >>insecure
f >>secure f >>secure
dup start-server* dup start-server*
sockets>> first addr>> port>> sockets>> first addr>> port>>
dup number>string "resource:temp/port-number" ascii set-file-contents dup number>string "resource:temp/port-number" ascii set-file-contents
] with-scope ] with-scope
"port" set ; "port" set ;
[ ] [ [ ] [
<dispatcher> <dispatcher>
add-quot-responder add-quot-responder
"vocab:http/test" <static> >>default "vocab:http/test" <static> >>default
test-httpd test-httpd
] unit-test ] unit-test
[ ] [ [ ] [
"tools.deploy.test.5" shake-and-bake "tools.deploy.test.5" shake-and-bake
run-temp-image run-temp-image
] unit-test ] unit-test
: add-port ( url -- url' ) : add-port ( url -- url' )
>url clone "port" get >>port ; >url clone "port" get >>port ;
[ ] [ "http://localhost/quit" add-port http-get 2drop ] unit-test [ ] [ "http://localhost/quit" add-port http-get 2drop ] unit-test
{ {
"tools.deploy.test.6" "tools.deploy.test.6"
"tools.deploy.test.7" "tools.deploy.test.7"
"tools.deploy.test.9" "tools.deploy.test.9"
"tools.deploy.test.10" "tools.deploy.test.10"
"tools.deploy.test.11" "tools.deploy.test.11"
"tools.deploy.test.12" "tools.deploy.test.12"
} [ } [
[ ] swap [ [ ] swap [
shake-and-bake shake-and-bake
run-temp-image run-temp-image
] curry unit-test ] curry unit-test
] each ] each
os windows? os macosx? or [ os windows? os macosx? or [
[ ] [ "tools.deploy.test.8" shake-and-bake run-temp-image ] unit-test [ ] [ "tools.deploy.test.8" shake-and-bake run-temp-image ] unit-test
] when ] when
os macosx? [ os macosx? [
[ ] [ "tools.deploy.test.14" shake-and-bake run-temp-image ] unit-test [ ] [ "tools.deploy.test.14" shake-and-bake run-temp-image ] unit-test
] when ] when
[ { "a" "b" "c" } ] [ [ { "a" "b" "c" } ] [
"tools.deploy.test.15" shake-and-bake deploy-test-command "tools.deploy.test.15" shake-and-bake deploy-test-command
{ "a" "b" "c" } append { "a" "b" "c" } append
ascii [ lines ] with-process-reader ascii [ lines ] with-process-reader
rest rest
] unit-test ] unit-test
[ ] [ "tools.deploy.test.16" shake-and-bake run-temp-image ] unit-test [ ] [ "tools.deploy.test.16" shake-and-bake run-temp-image ] unit-test
[ ] [ "tools.deploy.test.17" shake-and-bake run-temp-image ] unit-test [ ] [ "tools.deploy.test.17" shake-and-bake run-temp-image ] unit-test
[ t ] [ [ t ] [
"tools.deploy.test.18" shake-and-bake "tools.deploy.test.18" shake-and-bake
deploy-test-command ascii [ readln ] with-process-reader deploy-test-command ascii [ readln ] with-process-reader
"test.image" temp-file = "test.image" temp-file =
] unit-test ] unit-test