tools.deploy: delete all cached staging images in deploy tests.

db4
John Benediktsson 2012-06-19 17:13:45 -07:00
parent 4940130b91
commit 5372e0b9a5
1 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,15 @@ urls math.parser io.directories tools.deploy tools.deploy.test
vocabs ;
IN: tools.deploy.tests
! Delete all cached staging images in case syntax or
! other core vocabularies have changed and staging
! images are stale.
cache-directory [
[ "staging." head? ] filter
my-arch ".image" append [ tail? ] curry filter
[ delete-file ] each
] with-directory-files
[ "nosuchvocab" deploy ] [ no-vocab? ] must-fail-with
[ "no such vocab, fool!" deploy ] [ bad-vocab-name? ] must-fail-with