diff --git a/extra/mason/disk/disk-tests.factor b/extra/mason/disk/disk-tests.factor index b1c0a7e28f..6ebed55fad 100644 --- a/extra/mason/disk/disk-tests.factor +++ b/extra/mason/disk/disk-tests.factor @@ -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 diff --git a/extra/mason/report/report-tests.factor b/extra/mason/report/report-tests.factor index 92cada72da..b728c5df3b 100644 --- a/extra/mason/report/report-tests.factor +++ b/extra/mason/report/report-tests.factor @@ -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