]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.deploy: Make sure to deploy-test in a temp directory and not the factor/ directory.
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 29 Mar 2016 15:44:24 +0000 (08:44 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 29 Mar 2016 15:44:24 +0000 (08:44 -0700)
basis/tools/deploy/deploy-tests.factor

index 4528bce6a64c6cab6098864f4e1d7c9a288d9a19..251e7486e31c59a1c8932b3b592470275412967f 100644 (file)
@@ -18,12 +18,17 @@ delete-staging-images
 
 { } [ "hello-world" shake-and-bake 550000 small-enough? ] unit-test
 
+! XXX: deploy-path is "resource:" by default, but deploying there in a
+! test would pollute the Factor directory, so deploy test to temp.
 { { "Hello world" } } [
-    f open-directory-after-deploy? [
+    H{
+        { open-directory-after-deploy? f }
+        { deploy-directory $[ temp-directory ] }
+    } [
         "hello-world" deploy
         "hello-world" deploy-path 1array
         ascii [ lines ] with-process-reader
-    ] with-variable
+    ] with-variables
 ] unit-test
 
 { } [ "sudoku" shake-and-bake 800000 small-enough? ] unit-test