]> gitweb.factorcode.org Git - factor.git/commitdiff
mason tests didn't pass if the machine wasn't configured for running mason
authorSlava Pestov <slava@factorcode.org>
Sat, 10 Sep 2011 01:17:53 +0000 (18:17 -0700)
committerSlava Pestov <slava@factorcode.org>
Sat, 10 Sep 2011 02:14:55 +0000 (19:14 -0700)
extra/mason/disk/disk-tests.factor
extra/mason/report/report-tests.factor

index b1c0a7e28fe5e81138bae95322b1a9e9e845f599..6ebed55fad5024607ea054b332b0945800a05ac1 100644 (file)
@@ -1,6 +1,11 @@
-USING: mason.disk tools.test strings sequences ;
+USING: mason.config mason.disk namespaces io.directories
+io.files.temp tools.test strings sequences ;
 IN: mason.disk.tests
 
-[ t ] [ disk-usage string? ] unit-test
+"builds" temp-file builds-dir [
+    builds-dir get make-directories
 
-[ t ] [ sufficient-disk-space? { t f } member? ] unit-test
+    [ t ] [ disk-usage string? ] unit-test
+
+    [ t ] [ sufficient-disk-space? { t f } member? ] unit-test
+] with-variable
index 92cada72da862849fd4f8dc3b09fae87ccec509f..b728c5df3b2e44060adedf52d6c71c30491c6dd2 100644 (file)
@@ -1,6 +1,6 @@
 IN: mason.report.tests
-USING: io.files io.directories kernel mason.report mason.common
-tools.test xml xml.writer ;
+USING: io.files io.files.temp io.directories kernel mason.report
+mason.common mason.config namespaces tools.test xml xml.writer ;
 
 { 0 0 } [ [ ] with-report ] must-infer-as
 
@@ -9,20 +9,22 @@ tools.test xml xml.writer ;
      [ ] [ "report" file>xml drop ] unit-test
      [ ] [ "report" delete-file ] unit-test ;
 
-"resource:extra/mason/report/fake-data/" [
-     [ ] [
-          timings-table pprint-xml
-     ] unit-test
-
-     [ ] [ successful-report ] unit-test
-     verify-report
-
-     [ status-error ] [ 1234 compile-failed ] unit-test
-     verify-report
-
-     [ status-error ] [ 1235 boot-failed ] unit-test
-     verify-report
-
-     [ status-error ] [ 1236 test-failed ] unit-test
-     verify-report
-] with-directory
+"builds" temp-file builds-dir [
+    "resource:extra/mason/report/fake-data/" [
+         [ ] [
+              timings-table pprint-xml
+         ] unit-test
+    
+         [ ] [ successful-report ] unit-test
+         verify-report
+    
+         [ status-error ] [ 1234 compile-failed ] unit-test
+         verify-report
+    
+         [ status-error ] [ 1235 boot-failed ] unit-test
+         verify-report
+    
+         [ status-error ] [ 1236 test-failed ] unit-test
+         verify-report
+    ] with-directory
+] with-variable