Check-in [7c572fd6a8]
Overview
Comment:Updated to support running Win32 tests under WINE
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7c572fd6a8ec5a397122b96084d1576af6e6a56f
User & Date: rkeene on 2010-09-26 04:49:40
Other Links: manifest | tags
Context
2010-09-26
04:49
Increased timeout for tests check-in: ebe516878a user: rkeene tags: trunk
04:49
Updated to support running Win32 tests under WINE check-in: 7c572fd6a8 user: rkeene tags: trunk
04:49
Updated issue with opening directory

Updated to not panic if native encodings cannot be found check-in: 77e40265de user: rkeene tags: trunk

Changes

Modified build/test/publish-tests from [fdfea000f2] to [4c8dc5fa58].

   279    279   			puts $fd "        <td><a href=\"$kitinfo(file)\">$kitdesc</a></td>"
   280    280   		} else {
   281    281   			puts $fd "        <td>$kitdesc</td>"
   282    282   		}
   283    283   		puts $fd "        <td>[pretty_print_size [file size [file join $WEBDIR $kitinfo(fullfile)]]]</td>"
   284    284   		puts $fd "        <td bgcolor=\"$bgcolor\">$statustext</td>"
   285    285   		puts $fd "        <td><small><a href=\"$kitinfo(buildfile)\">([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])</a></small></td>"
   286         -		puts $fd "        <td>[join $failedtestshtml {, }]</td>"
          286  +		puts $fd "        <td>[join $failedtestshtml {,<br>}]</td>"
   287    287   		puts $fd "      </tr>"
   288    288   	}
   289    289   
   290    290   }
   291    291   puts $fd "    </table>"
   292    292   puts $fd "    <table cellpadding=\"2\" border=\"1\">"
   293    293   puts $fd "      <tr>"

Modified build/test/test from [a5bd4b45c4] to [c09d55bb0e].

    57     57   	kitcreator="./kitcreator"
    58     58   	args=""
    59     59   	runnable="1"
    60     60   	iszip="0"
    61     61   	statictk="0"
    62     62   	notk="0"
    63     63   	nomk4="0"
           64  +	xcompile="0"
           65  +	kitruncmd=""
    64     66   
    65     67   	# Handle base configuration
    66     68   	os="$(uname -s | dd conv=lcase 2>/dev/null)"
    67     69   	cpu="$(uname -m | dd conv=lcase 2>/dev/null)"
    68     70   	case "${kit}" in
    69     71   		normal|normal-*)
    70     72   			kit="$(echo "${kit}" | sed "s@^normal@$os-$cpu@")"
................................................................................
    79     81   			kitcreator="./build/make-minkit-static"
    80     82   			iszip="1"
    81     83   			notk="1"
    82     84   			kit="${os}-${cpu}-min-static"
    83     85   			;;
    84     86   		win32|win32-*)
    85     87   			kitcreator="./build/make-kit-win32"
    86         -			runnable="0"
           88  +			xcompile="1"
           89  +			kitruncmd="wine"
    87     90   			;;
    88     91   		linux-arm-min)
    89     92   			kitcreator="./build/make-kit-arm"
    90     93   			runnable="0"
           94  +			xcompile="1"
    91     95   			notk="1"
    92     96   			iszip="1"
    93     97   			;;
    94     98   	esac
    95     99   
    96         -	if [ "${runnable}" != "1" ]; then
          100  +	if [ "${xcompile}" != "0" ]; then
    97    101   		kit="${kit}-xcompile"
    98    102   	fi
    99    103   
   100    104   	# Handle additional configuration
   101    105   	tempkit="-${kit}-"
   102    106   	for try in 1 2 3 4 5 6 7 8 9; do
   103    107   		case "-${tempkit}-" in
................................................................................
   294    298   		## Clean tests log
   295    299   		rm -f "${testresultslog}"
   296    300   		for testscp in "${TESTDIR}"/tests/*.tcl; do
   297    301   			testscp_tag="$(basename "${testscp}" .tcl)"
   298    302   			testscppre="$(dirname "${testscp}")/${testscp_tag}.sh"
   299    303   			scplogfile="${outputname}-${testscp_tag}.log"
   300    304   
          305  +			# If a command is required to start the kit, prepare to kill it
          306  +			# in case of timeout.
          307  +			kitrunkillpid=""
          308  +			if [ -n "${kitruncmd}" ]; then
          309  +				(
          310  +					sleep 30
          311  +					killall "$(basename "${outputname}")" >/dev/null 2>/dev/null
          312  +				) >/dev/null 2>/dev/null &
          313  +				kitrunkillpid="$!"
          314  +			fi
          315  +
   301    316   			(
   302    317   				if [ -f "${testscppre}" ]; then
   303    318   					. "${testscppre}"
   304    319   				fi
   305    320   
   306         -				"${outputname}" "${testscp}" "${outputname}" "${kit}" "${version}"
          321  +				${kitruncmd} "${outputname}" "${testscp}" "${outputname}" "${kit}" "${version}"
   307    322   			) > "${scplogfile}" 2>&1
   308    323   
   309    324   			if [ "$?" != "0" ]; then
   310    325   				echo "Script failed: ${testscp_tag} on ${version}/${kit}" >&2
   311    326   
   312    327   				failed="${failed} ${version}/${kit}-test-${testscp_tag}"
   313    328   
   314    329   				echo "${testscp_tag}: FAIL" >>  "${testresultslog}"
   315    330   
   316    331   				continue
   317    332   			fi
          333  +
          334  +			# Kill the watchdog for this iteration
          335  +			if [ -n "${kitrunkillpid}" ]; then
          336  +				kill -9 "${kitrunkillpid}" >/dev/null 2>/dev/null
          337  +			fi
   318    338   
   319    339   			echo "${testscp_tag}: PASS" >>  "${testresultslog}"
   320    340   
   321    341   			rm -f "${scplogfile}"
   322    342   		done
   323    343   	done
   324    344   done

Modified build/test/tests/02-nameofexe.tcl from [e8193d8a25] to [08a58cef96].

     1      1   #! /usr/bin/env tclsh
     2      2   
     3      3   set outputname [lindex $argv 0]
     4      4   
     5      5   if {[info nameofexecutable] == $outputname} {
     6      6   	exit 0
     7      7   }
            8  +
            9  +# Under Wine, the drive letter is added
           10  +if {[info nameofexecutable] == "Z:$outputname"} {
           11  +	exit 0
           12  +}
           13  +
           14  +puts "Info NameOfExe: [info nameofexecutable]"
           15  +puts "Expected:       $outputname"
     8     16   
     9     17   exit 1

Modified build/test/tests/05-locale.tcl from [19da5ec8b9] to [995899b7e1].

     1      1   #! /usr/bin/env tclsh
     2      2   
     3      3   # Tcl 8.4 doesn't support fetching the system encoding from the environment
     4      4   if {$tcl_version == "8.4"} {
     5      5   	exit 0
     6      6   }
            7  +
            8  +# This test does not yet support when using Win32
            9  +if {$::tcl_platform(platform) == "windows"} {
           10  +	exit 0
           11  +}
     7     12   
     8     13   if {[encoding system] == "utf-8"} {
     9     14   	exit 0
    10     15   }
    11     16   
    12     17   puts "Locale:   [encoding system]"
    13     18   puts "Expected: utf-8"
    14     19   
    15     20   exit 1