Index: build/test/publish-tests ================================================================== --- build/test/publish-tests +++ build/test/publish-tests @@ -70,14 +70,20 @@ } proc pretty_print_size {size} { foreach unit [list "" K M G T P] { if {$size < 1024} { + if {$size < 10} { + set size [expr {round($size * 10) / 10.0}] + } else { + set size [expr {round($size)}] + } + return "$size [string trim ${unit}B]" } - set size [expr {${size} / 1024}] + set size [expr {${size} / 1024.000}] } } ########################################################################## ## MAIN BODY ############################################################# @@ -157,10 +163,11 @@ puts $fd " <body>" puts $fd " <table cellpadding=\"2\" border=\"1\">" foreach key [lsort -dictionary [array names allkitinfo]] { puts $fd " <tr>" puts $fd " <th><u>Tclkit for [pretty_print_key $key]</u></th>" + puts $fd " <th>Kit Size</th>" puts $fd " <th>Status</th>" puts $fd " <th>Log</th>" puts $fd " <th>Failed Tests</th>" puts $fd " </tr>" foreach kitinfo_list $allkitinfo($key) { @@ -197,10 +204,11 @@ lappend failedtestshtml "<small><a href=\"$test\">$testname</a></small>" } puts $fd " <td><a href=\"$kitinfo(file)\">[pretty_print_buildinfo $kitinfo(buildflags)]</a></td>" + puts $fd " <td>[pretty_print_size [file size [file join $WEBDIR $kitinfo(file)]]]</td>" puts $fd " <td bgcolor=\"$bgcolor\">$status</td>" puts $fd " <td><small><a href=\"$kitinfo(buildfile)\">([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])</a></small></td>" puts $fd " <td>[join $failedtestshtml {, }]</td>" puts $fd " </tr>" } Index: build/test/test ================================================================== --- build/test/test +++ build/test/test @@ -130,23 +130,54 @@ continue fi echo "Creating Tclkit ${version}/${kit}..." + echo " *** Build started $(whoami)@$(hostname) on $(date)" > "${buildlog}" + echo '' >> "${buildlog}" + echo " *** Build Script" >> "${buildlog}" if [ "${notk}" = "1" ]; then KITCREATOR_PKGS='itcl mk4tcl' export KITCREATOR_PKGS + + echo " KITCREATOR_PKGS=\"${KITCREATOR_PKGS}\"" >> "${buildlog}" + echo " export KITCREATOR_PKGS" >> "${buildlog}" fi if [ "${statictk}" = "1" ]; then STATICTK="1" export STATICTK + + echo " STATICTK=\"${STATICTK}\"" >> "${buildlog}" + echo " export STATICTK" >> "${buildlog}" + fi + + if [ "${kitcreator}" != "./kitcreator" ]; then + echo " mkdir build" >> "${buildlog}" + + # Several build scripts rely on minkit to work + if grep './build/make-minkit' "${kitcreator}" >/dev/null 2>/dev/null; then + echo " cat << \__EOF__ > ./build/make-minkit" >> "${buildlog}" + sed 's@^@ @' './build/make-minkit' >> "${buildlog}" + echo " __EOF__" >> "${buildlog}" + echo '' >> "${buildlog}" + fi + echo " cat << \__EOF__ > ${kitcreator}" >> "${buildlog}" + sed 's@^@ @' "${kitcreator}" >> "${buildlog}" + echo " __EOF__" >> "${buildlog}" + echo '' >> "${buildlog}" fi + echo " \"${kitcreator}\" \"${version}\" ${args}" >> "${buildlog}" + echo '' >> "${buildlog}" + echo '' >> "${buildlog}" + echo '' >> "${buildlog}" + echo " *** Build Results" >> "${buildlog}" + echo '' >> "${buildlog}" buildfailed="0" - "${kitcreator}" "${version}" ${args} > "${buildlog}" 2>&1 || buildfailed="1" + "${kitcreator}" "${version}" ${args} >> "${buildlog}" 2>&1 || buildfailed="1" grep -n '^' */build.log >> "${buildlog}" 2>&1 if [ ! -f "${createdkit}" ]; then echo "Failed to create kit ${version}/${kit}" >&2