actions fail { false } import testing ; rule my-run-fail ( target : source : options * ) { make $(target) : $(source) : @fail : $(options) ; make $(target).test : $(target) : @testing.expect-failure ; } my-run-fail a : a.txt ;