diff --git a/extra/bunny/deploy.factor b/extra/bunny/deploy.factor index 643737b23c..22e97b455e 100755 --- a/extra/bunny/deploy.factor +++ b/extra/bunny/deploy.factor @@ -1,15 +1,15 @@ USING: tools.deploy.config ; H{ - { deploy-word-defs? f } + { deploy-math? t } + { deploy-reflection 2 } + { deploy-io 3 } + { deploy-c-types? f } { deploy-random? f } + { deploy-ui? t } { deploy-name "Bunny" } + { deploy-word-defs? f } + { "stop-after-last-window?" t } { deploy-threads? t } { deploy-compiler? t } - { deploy-math? t } - { deploy-c-types? f } - { deploy-io 3 } - { deploy-reflection 1 } - { deploy-ui? t } - { "stop-after-last-window?" t } { deploy-word-props? f } } diff --git a/extra/http/http-tests.factor b/extra/http/http-tests.factor index 9b95dc1408..7ddf6cf3aa 100755 --- a/extra/http/http-tests.factor +++ b/extra/http/http-tests.factor @@ -215,7 +215,7 @@ test-db [ [ t ] [ "resource:extra/http/test/foo.html" ascii file-contents - "http://localhost:1237/nested/foo.html" http-get nip ascii decode = + "http://localhost:1237/nested/foo.html" http-get nip = ] unit-test [ "http://localhost:1237/redirect-loop" http-get nip ] diff --git a/extra/tools/deploy/deploy-tests.factor b/extra/tools/deploy/deploy-tests.factor index 5309784b7c..ed22902af2 100755 --- a/extra/tools/deploy/deploy-tests.factor +++ b/extra/tools/deploy/deploy-tests.factor @@ -62,3 +62,38 @@ namespaces continuations layouts accessors ; 2array try-process ] curry unit-test ] each + +USING: http.client furnace.actions http.server http.server.dispatchers +http.server.responses http.server.static io.servers.connection ; + +: add-quit-action + + [ stop-server "Goodbye" "text/html" ] >>display + "quit" add-responder ; + +: test-httpd ( -- ) + #! Return as soon as server is running. + + 1237 >>insecure + f >>secure + start-server* ; + +[ ] [ + [ + + add-quit-action + "resource:extra/http/test" >>default + main-responder set + + test-httpd + ] with-scope +] unit-test + +[ ] [ + "tools.deploy.test.5" shake-and-bake + vm + "-i=" "test.image" temp-file append + 2array try-process +] unit-test + +[ ] [ "http://localhost:1237/quit" http-get 2drop ] unit-test diff --git a/extra/tools/deploy/shaker/shaker.factor b/extra/tools/deploy/shaker/shaker.factor index f9b56a1d8d..5a20dd8911 100755 --- a/extra/tools/deploy/shaker/shaker.factor +++ b/extra/tools/deploy/shaker/shaker.factor @@ -69,26 +69,69 @@ IN: tools.deploy.shaker [ "no-def-strip" word-prop not ] filter [ [ ] swap set-word-def ] each ; -: strip-word-props ( retain-props words -- ) +: strip-word-props ( stripped-props words -- ) "Stripping word properties" show [ [ word-props swap - '[ , nip member? ] assoc-filter + '[ , nip member? not ] assoc-filter f assoc-like ] keep set-word-props ] with each ; -: retained-props ( -- seq ) +: stripped-word-props ( -- seq ) [ - "class" , - "metaclass" , - "layout" , - deploy-ui? get [ - "gestures" , - "commands" , - { "+nullary+" "+listener+" "+description+" } - [ "ui.commands" lookup , ] each + strip-dictionary? [ + { + "coercer" + "compiled-effect" + "compiled-uses" + "constraints" + "declared-effect" + "default-output-classes" + "identities" + "if-intrinsics" + "infer" + "inferred-effect" + "interval" + "intrinsics" + "loc" + "members" + "methods" + "combination" + "cannot-infer" + "default-method" + "optimizer-hooks" + "output-classes" + "participants" + "predicate" + "predicate-definition" + "predicating" + "slots" + "slot-names" + "specializer" + "step-into" + "step-into?" + "superclass" + "reading" + "writing" + "type" + "engines" + } % + ] when + + strip-prettyprint? [ + { + "delimiter" + "flushable" + "foldable" + "inline" + "lambda" + "macro" + "memo-quot" + "parsing" + "word-style" + } % ] when ] { } make ; @@ -134,11 +177,11 @@ IN: tools.deploy.shaker strip-io? [ io.backend:io-backend , ] when - [ - io.backend:io-backend , - "default-buffer-size" "io.ports" lookup , - ] { } make - { "alarms" "io" "tools" } strip-vocab-globals % + { } { + "alarms" + "tools" + "io.launcher" + } strip-vocab-globals % strip-dictionary? [ { } { "cpu" } strip-vocab-globals % @@ -243,7 +286,7 @@ SYMBOL: deploy-vocab strip-recompile-hook strip-init-hooks deploy-vocab get vocab-main set-boot-quot* - retained-props >r + stripped-word-props >r stripped-globals strip-globals r> strip-words ; diff --git a/extra/tools/deploy/test/4/deploy.factor b/extra/tools/deploy/test/4/deploy.factor index 5250ad698a..894d6aa62e 100644 --- a/extra/tools/deploy/test/4/deploy.factor +++ b/extra/tools/deploy/test/4/deploy.factor @@ -1,15 +1,15 @@ USING: tools.deploy.config ; H{ { deploy-math? f } - { deploy-ui? f } - { deploy-compiler? t } - { deploy-word-props? f } - { deploy-word-defs? f } + { deploy-reflection 1 } { deploy-io 2 } - { deploy-name "tools.deploy.test.4" } { deploy-c-types? f } { deploy-random? f } + { deploy-ui? f } + { deploy-name "tools.deploy.test.4" } + { deploy-word-defs? f } { "stop-after-last-window?" t } { deploy-threads? t } - { deploy-reflection 1 } + { deploy-compiler? t } + { deploy-word-props? f } } diff --git a/extra/tools/deploy/test/5/5.factor b/extra/tools/deploy/test/5/5.factor new file mode 100644 index 0000000000..debc020d49 --- /dev/null +++ b/extra/tools/deploy/test/5/5.factor @@ -0,0 +1,7 @@ +IN: tools.deploy.test.5 +USING: http.client kernel ; + +: deploy-test-5 ( -- ) + "http://localhost:1237/foo.html" http-get 2drop ; + +MAIN: deploy-test-5 diff --git a/extra/tools/deploy/test/5/deploy.factor b/extra/tools/deploy/test/5/deploy.factor new file mode 100644 index 0000000000..87536457b0 --- /dev/null +++ b/extra/tools/deploy/test/5/deploy.factor @@ -0,0 +1,15 @@ +USING: tools.deploy.config ; +H{ + { deploy-math? t } + { deploy-reflection 2 } + { deploy-io 3 } + { deploy-c-types? f } + { deploy-random? t } + { deploy-ui? f } + { deploy-name "tools.deploy.test.5" } + { deploy-word-defs? f } + { "stop-after-last-window?" t } + { deploy-threads? t } + { deploy-compiler? t } + { deploy-word-props? f } +}