webapps.mason.report: fix and tc for the stack underflow error in build reports

db4
Björn Lindqvist 2015-09-24 11:33:06 +02:00
parent 924fc60e30
commit d465924396
2 changed files with 15 additions and 9 deletions

View File

@ -0,0 +1,7 @@
USING: accessors stack-checker tools.test webapps.mason.report ;
IN: webapps.mason.report.tests
! <build-report-action>
{ ( -- x ) } [
<build-report-action> display>> infer
] unit-test

View File

@ -4,18 +4,17 @@ USING: accessors furnace.actions http.server.responses kernel
urls xml.syntax webapps.mason.backend webapps.mason.utils ; urls xml.syntax webapps.mason.backend webapps.mason.utils ;
IN: webapps.mason.report IN: webapps.mason.report
: <build-report-action> ( -- action ) : build-report ( -- response )
<action>
[ validate-os/cpu ] >>init
[
[ [
current-builder [ current-builder [
last-report>> <html-content> last-report>> <html-content>
] [ ] [ <404> ] if*
<404> ] with-mason-db ;
] if
] with-mason-db : <build-report-action> ( -- action )
] >>display ; <action>
[ validate-os/cpu ] >>init
[ build-report ] >>display ;
: report-link ( builder -- xml ) : report-link ( builder -- xml )
[ URL" report" ] dip [ URL" report" ] dip