Index: build/test/publish-tests ================================================================== --- build/test/publish-tests +++ build/test/publish-tests @@ -138,16 +138,39 @@ } } # Derive what we can from the filename set buildfile "${shortfile}-build.log" - set failedtests [glob -nocomplain -tails -directory $WEBDIR "${shortfile}-\[0-9\]\[0-9\]-*.log"] + + # Determine which tests passed/failed + set failedtests [list] + set passedtests [list] + set testsfile "${file}-tests.log" + if {[file exists $testsfile]} { + set testfd [open $testsfile r] + foreach line [split [read $testfd] \n] { + set work [split $line :] + set test [string trim [lindex $work 0]] + set result [string trim [lindex $work 1]] + + switch -- $result { + "PASS" { + lappend passedtests "${shortfile}-${test}.log" + } + "FAIL" { + lappend failedtests "${shortfile}-${test}.log" + } + } + } + close $testfd + } # If this kit represents a failed build, set the failed tests to that set kitbuilt 1 if {[file tail [file dirname $file]] == "failed"} { set failedtests [list "${shortfile}-XX-build.log"] + set passedtests [list] set kitbuilt 0 } ## Split the filename into parts and store each part unset -nocomplain kitos kitcpu @@ -164,10 +187,11 @@ set kitinfo(version) $tclversion set kitinfo(file) $shortfile set kitinfo(fullfile) $file set kitinfo(buildfile) $buildfile set kitinfo(failedtests) $failedtests + set kitinfo(passedtests) $passedtests set kitinfo(buildflags) $kitbuildinfo set kitinfo(os) $kitos set kitinfo(cpu) $kitcpu set kitinfo(built) $kitbuilt @@ -202,11 +226,11 @@ if {[llength $kitinfo(failedtests)] == 0} { set status ok # If we are cross-compiled, note that no tests were run - if {[lsearch -exact $kitinfo(buildflags) xcompile] != -1} { + if {[llength $kitinfo(passedtests)] == 0} { set status untested } } else { set status non-critical } Index: build/test/test ================================================================== --- build/test/test +++ build/test/test @@ -131,10 +131,11 @@ createdkit="tclkit-${version}" outputname="${TESTDIR}/kits/tclkit-${version}-${kit}" failoutputname="${TESTDIR}/kits/failed/tclkit-${version}-${kit}" buildlog="${outputname}-build.log" failbuildlog="${failoutputname}-build.log" + testresultslog="${outputname}-tests.log" if [ ! -f "${outputname}" ]; then unset KITCREATOR_PKGS STATICTK if [ -f "${failoutputname}" ]; then @@ -264,10 +265,12 @@ if [ "${runnable}" != "1" ]; then continue fi # Perform battery of tests + ## Clean tests log + rm -f "${testresultslog}" for testscp in "${TESTDIR}"/tests/*.tcl; do testscp_tag="$(basename "${testscp}" .tcl)" testscppre="$(dirname "${testscp}")/${testscp_tag}.sh" scplogfile="${outputname}-${testscp_tag}.log" @@ -282,16 +285,20 @@ if [ "$?" != "0" ]; then echo "Script failed: ${testscp_tag} on ${version}/${kit}" >&2 failed="${failed} ${version}/${kit}-test-${testscp_tag}" + echo "${testscp_tag}: FAIL" >> "${testresultslog}" + continue fi + + echo "${testscp_tag}: PASS" >> "${testresultslog}" rm -f "${scplogfile}" done done done if [ -n "${failed}" ]; then echo "Failed: ${failed}" fi Index: build/test/tests/05-locale.tcl ================================================================== --- build/test/tests/05-locale.tcl +++ build/test/tests/05-locale.tcl @@ -6,7 +6,10 @@ } if {[encoding system] == "utf-8"} { exit 0 } + +puts "Locale: [encoding system]" +puts "Expected: utf-8" exit 1