Overview
Comment: | Added internal testing script |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | b180e9a80f779df1d0dcc371253de3e17b2ec6e1 |
User & Date: | rkeene on 2010-09-26 04:46:10 |
Other Links: | manifest | tags |
Context
2010-09-26
| ||
04:46 |
Added script to publish test results
Added new "parray" test check-in: 2a8304f779 user: rkeene tags: trunk | |
04:46 | Added internal testing script check-in: b180e9a80f user: rkeene tags: trunk | |
04:46 |
Updated ARM and Static internal build scripts to use Minimal build script
Added internal test script check-in: b9a63425fb user: rkeene tags: trunk | |
Changes
Modified build/test/test from [cc021be514] to [00a188ebb7].
1 1 #! /bin/bash 2 2 3 3 VERSIONS="8.4.19 8.5.9 cvs_HEAD" 4 4 5 +# Find the base directory 5 6 for x in 1 2 3 __fail__; do 6 7 if [ "${x}" = "${fail}" ]; then 7 8 echo 'Unable to find KitCreator, aborting.' >&2 8 9 9 10 exit 1 10 11 fi 11 12 ................................................................................ 16 17 cd .. 17 18 done 18 19 19 20 ROOTDIR="$(pwd)" 20 21 TESTDIR="${ROOTDIR}/build/test" 21 22 export ROOTDIR TESTDIR 22 23 23 -rm -f "${TESTDIR}"/tclkit-* 24 +# Handle command-line arguments 25 +if [ "$1" = "clean" ]; then 26 + rm -rf "${TESTDIR}/kits" 27 +fi 28 + 29 +# Create place to put kits 30 +mkdir "${TESTDIR}/kits" >/dev/null 2>/dev/null 31 +if [ ! -d "${TESTDIR}/kits" ]; then 32 + echo 'Unable to create kits/ directory, aborting.' >&2 33 + 34 + exit 1 35 +fi 36 + 37 +# Cleanup 38 +for file in "${TESTDIR}"/kits/*.log; do 39 + if echo "${file}" | grep -- '-build.log$' >/dev/null; then 40 + continue 41 + fi 42 + 43 + rm -f "${file}" 44 +done 24 45 25 46 failed="" 26 -for kit in normal threaded min static win32 arm; do 47 +for kit in normal normal-zip normal-threaded normal-threaded-zip normal-notk normal-threaded-notk normal-threaded-zip-notk min min-static win32 win32-zip win32-threaded win32-threaded-zip win32-notk win32-threaded-notk arm-min; do 27 48 kitcreator="./kitcreator" 28 49 args="" 29 50 runnable="1" 51 + iszip="0" 52 + statictk="0" 53 + notk="0" 30 54 55 + # Handle base configuration 31 56 case "${kit}" in 32 - normal) 57 + normal|normal-*) 33 58 true 34 59 ;; 35 - threaded) 36 - args="--enable-threads" 37 - ;; 38 60 min) 39 61 kitcreator="./build/make-minkit" 62 + iszip="1" 63 + notk="1" 40 64 ;; 41 - static) 65 + min-static) 42 66 kitcreator="./build/make-minkit-static" 67 + iszip="1" 68 + notk="1" 43 69 ;; 44 - win32) 70 + win32|win32-*) 45 71 kitcreator="./build/make-kit-win32" 46 72 runnable="0" 47 73 ;; 48 - arm) 74 + arm-min) 49 75 kitcreator="./build/make-kit-arm" 50 76 runnable="0" 77 + notk="1" 78 + iszip="1" 51 79 ;; 52 80 esac 53 81 82 + # Handle additional configuration 83 + tempkit="-${kit}-" 84 + for try in 1 2 3 4 5 6 7 8 9; do 85 + case "-${tempkit}-" in 86 + *-threaded-*) 87 + tempkit="$(echo "${tempkit}" | sed 's@-threaded-@-@')" 88 + args="${args} --enable-threads" 89 + ;; 90 + *-zip-*) 91 + tempkit="$(echo "${tempkit}" | sed 's@-zip-@-@')" 92 + args="${args} --enable-kit-storage=zip" 93 + iszip="1" 94 + ;; 95 + *-statictk-*) 96 + tempkit="$(echo "${tempkit}" | sed 's@-statictk-@-@')" 97 + if [ "${notk}" = "0" ]; then 98 + statictk="1" 99 + else 100 + echo "${kit}: Unable to create StaticTk and NoTk, ignoring StaticTk" >&2 101 + fi 102 + ;; 103 + *-notk-*) 104 + tempkit="$(echo "${tempkit}" | sed 's@-notk-@-@')" 105 + if [ "${statictk}" = "0" ]; then 106 + notk="1" 107 + else 108 + echo "${kit}: Unable to create StaticTk and NoTk, ignoring NoTk" >&2 109 + fi 110 + ;; 111 + esac 112 + done 54 113 55 114 for version in ${VERSIONS}; do 115 + # Create Tclkit 56 116 createdkit="tclkit-${version}" 57 - outputname="${TESTDIR}/tclkit-${version}-${kit}" 117 + outputname="${TESTDIR}/kits/tclkit-${version}-${kit}" 118 + buildlog="${outputname}-build.log" 119 + 120 + if [ ! -f "${outputname}" ]; then 121 + unset KITCREATOR_PKGS STATICTK 122 + 123 + echo "Creating Tclkit ${version}/${kit}..." 124 + 125 + if [ "${notk}" = "1" ]; then 126 + KITCREATOR_PKGS='itcl mk4tcl' 127 + export KITCREATOR_PKGS 128 + fi 129 + 130 + if [ "${statictk}" = "1" ]; then 131 + STATICTK="1" 132 + export STATICTK 133 + fi 134 + 135 + buildfailed="0" 136 + "${kitcreator}" "${version}" ${args} > "${buildlog}" 2>&1 || buildfailed="1" 137 + grep -n '^' */build.log >> "${buildlog}" 2>&1 138 + 139 + if [ ! -f "${createdkit}" ]; then 140 + echo "Failed to create kit ${version}/${kit}" >&2 141 + 142 + failed="${failed} ${version}/${kit}-build" 143 + 144 + continue 145 + fi 146 + 147 + # Verify sanity of created kit 148 + issane=1 149 + 150 + ## Verify the Win32 kits are 151 + case "-${version}-${kit}-" in 152 + *-win32-notk-*|*-win32-*-notk-*) 153 + if ! file "${createdkit}" | grep 'MS Windows (console)' >/dev/null; then 154 + echo "Kit failed sanity check for being a console application" >&2 155 + issane=0 156 + fi 157 + ;; 158 + *-win32-*) 159 + if ! file "${createdkit}" | grep 'MS Windows (GUI)' >/dev/null; then 160 + echo "Kit failed sanity check for being a GUI application" >&2 161 + issane=0 162 + fi 163 + ;; 164 + esac 165 + 166 + ## Verify the build completed without warnings 167 + if [ "${buildfailed}" = "1" ]; then 168 + echo "Kit failed sanity check for Building" >&2 169 + 170 + issane=0 171 + fi 172 + 173 + # Make note of sanity failure 174 + if [ "${issane}" != "1" ]; then 175 + echo "Kit failed sanity ${version}/${kit}" >&2 176 + 177 + failed="${failed} ${version}/${kit}-sanity" 178 + 179 + rm -f "${createdkit}" 180 + 181 + continue 182 + fi 183 + 184 + # Rename created kit to final destination 185 + mv "${createdkit}" "${outputname}" 186 + fi 58 187 59 - "${kitcreator}" "${version}" ${args} 188 + # Test zip status 189 + if unzip -l "${outputname}" 2>&1 | grep 'boot\.tcl' >/dev/null; then 190 + canunzip="1" 191 + else 192 + canunzip="0" 193 + fi 60 194 61 - if [ ! -f "${createdkit}" ]; then 62 - echo "Failed to create kit ${version}/${kit}" >&2 195 + if [ "${iszip}" != "${canunzip}" ]; then 196 + echo "Failed to unzip zipkit or was able to unzip non-zipkit ${version}/${kit}" >&2 63 197 64 - failed="${failed} ${version}/${kit}-build" 198 + failed="${failed} ${version}/${kit}-zip" 65 199 66 200 continue 67 201 fi 68 202 69 - mv "${createdkit}" "${outputname}" 70 - 203 + # Do not continue past here for un-runnable kits 71 204 if [ "${runnable}" != "1" ]; then 72 205 continue 73 206 fi 74 207 208 + # Perform battery of tests 209 + for testscp in "${TESTDIR}"/tests/*.tcl; do 210 + testscp_tag="$(basename "${testscp}" .tcl)" 211 + testscppre="$(dirname "${testscp}")/${testscp_tag}.sh" 212 + scplogfile="${outputname}-${testscp_tag}.log" 213 + 214 + ( 215 + if [ -f "${testscppre}" ]; then 216 + . "${testscppre}" 217 + fi 218 + 219 + "${outputname}" "${testscp}" "${outputname}" "${kit}" "${version}" 220 + ) > "${scplogfile}" 2>&1 75 221 76 - scriptid=0 77 - for testscp in 'exit 0' 'if {[::tcl::pkgconfig get 64bit] == 0} { exit 0 } else { exit 1}'; do 78 - scriptid=$[${scriptid} + 1] 79 - if ! echo "${testscp}" | "${outputname}" >/dev/null 2>/dev/null; then 80 - echo "Script failed: ${testscp} on ${version}/${kit}" >&2 222 + if [ "$?" != "0" ]; then 223 + echo "Script failed: ${testscp_tag} on ${version}/${kit}" >&2 81 224 82 - failed="${failed} ${version}/${kit}-test-${scriptid}" 225 + failed="${failed} ${version}/${kit}-test-${testscp_tag}" 83 226 84 227 continue 85 228 fi 86 229 done 87 230 done 88 231 done 89 232 90 233 if [ -n "${failed}" ]; then 91 234 echo "Failed: ${failed}" 92 235 fi
Added build/test/tests/00-works.tcl version [96fa9438a9].
1 +#! /usr/bin/env tclsh 2 + 3 +exit 0
Added build/test/tests/01-pkgconfig.tcl version [80d95d3049].
1 +#! /usr/bin/env tclsh 2 + 3 +# Tcl 8.4 doesn't support this test 4 +if {$tcl_version == "8.4"} { 5 + exit 0 6 +} 7 + 8 +if {[tcl::pkgconfig get 64bit] == 0} { 9 + exit 0 10 +} 11 + 12 +exit 1
Added build/test/tests/02-nameofexe.tcl version [e8193d8a25].
1 +#! /usr/bin/env tclsh 2 + 3 +set outputname [lindex $argv 0] 4 + 5 +if {[info nameofexecutable] == $outputname} { 6 + exit 0 7 +} 8 + 9 +exit 1
Added build/test/tests/03-argv0.tcl version [c51072ab98].
1 +#! /usr/bin/env tclsh 2 + 3 +if {[file tail $argv0] == "03-argv0.tcl"} { 4 + exit 0 5 +} 6 + 7 +exit 1
Added build/test/tests/04-version.tcl version [d679aaf9ec].
1 +#! /usr/bin/env tclsh 2 + 3 +set chkversion [lindex $argv 2] 4 + 5 +# We are unable to make a reasonable determination of the version from a CVS 6 +# tag. Assume it's okay. 7 +if {[string match "cvs_*" $chkversion]} { 8 + exit 0 9 +} 10 + 11 +if {[info patchlevel] == $chkversion} { 12 + exit 0 13 +} 14 + 15 +exit 1
Added build/test/tests/05-locale.sh version [62817958fb].
1 +#! /bin/bash 2 + 3 +unset $(locale | cut -f 1 -d =) 4 +LANG="UTF-8" 5 +export LANG
Added build/test/tests/05-locale.tcl version [302e0dfbb0].
1 +#! /usr/bin/env tclsh 2 + 3 +# Tcl 8.4 doesn't support fetching the system encoding from the environment 4 +if {$tcl_version == "8.4"} { 5 + exit 0 6 +} 7 + 8 +if {[encoding system] == "utf-8"} { 9 + exit 0 10 +} 11 + 12 +exit 1