From aa4a9f8288d3191e2770590a4a1ae771e42b37b4 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 18 Mar 2010 17:25:56 +1300 Subject: [PATCH] mason.test: fix outdated boot image check --- extra/mason/test/test.factor | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/extra/mason/test/test.factor b/extra/mason/test/test.factor index fba3ed58c4..e99f76c8c4 100644 --- a/extra/mason/test/test.factor +++ b/extra/mason/test/test.factor @@ -58,19 +58,21 @@ M: method word-vocabulary "method-generic" word-prop word-vocabulary ; compiler-error-messages-file do-step ; -: check-boot-image ( -- ) - "" to-refresh drop 2dup [ empty? not ] either? - [ - "Boot image is out of date. Changed vocabs:" print - members [ print ] each - flush - 1 exit - ] [ 2drop ] if ; +: outdated-core-vocabs ( -- modified-sources modified-docs any? ) + "" to-refresh drop 2dup [ empty? not ] either? ; + +: outdated-boot-image. ( modified-sources modified-docs -- ) + "Boot image is out of date. Changed vocabs:" print + union [ print ] each + flush ; + +: check-boot-image ( -- ? ) + outdated-core-vocabs [ outdated-boot-image. t ] [ 2drop f ] if ; : do-all ( -- ) ".." [ bootstrap-time get boot-time-file to-file - check-boot-image + check-boot-image [ 1 exit ] when [ do-load ] benchmark load-time-file to-file [ generate-help ] benchmark html-help-time-file to-file [ do-tests ] benchmark test-time-file to-file