From f44c67e5c307103abd550e49d2cd05f1c26bb8fd Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 4 Apr 2009 20:34:09 -0500 Subject: [PATCH] mason.test: check if boot image is out of date, and refuse to build if so --- extra/mason/test/test.factor | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/extra/mason/test/test.factor b/extra/mason/test/test.factor index a15a96c63e..bc00f659fa 100644 --- a/extra/mason/test/test.factor +++ b/extra/mason/test/test.factor @@ -4,7 +4,7 @@ USING: accessors assocs benchmark bootstrap.stage2 compiler.errors generic help.html help.lint io.directories io.encodings.utf8 io.files kernel mason.common math namespaces prettyprint sequences sets sorting tools.test tools.time -tools.vocabs words ; +tools.vocabs words system io ; IN: mason.test : do-load ( -- ) @@ -44,9 +44,19 @@ M: method-body word-vocabulary "method-generic" word-prop word-vocabulary ; : benchmark-ms ( quot -- ms ) benchmark 1000 /i ; inline +: check-boot-image ( -- ) + "" to-refresh drop 2dup [ empty? not ] either? + [ + "Boot image is out of date. Changed vocabs:" print + append prune [ print ] each + flush + 1 exit + ] [ 2drop ] if ; + : do-all ( -- ) ".." [ bootstrap-time get boot-time-file to-file + check-boot-image [ do-load do-compile-errors ] benchmark-ms load-time-file to-file [ generate-help ] benchmark-ms html-help-time-file to-file [ do-tests ] benchmark-ms test-time-file to-file