Check-in [404a1c438f]
Overview
Comment:Updated to include timeout for tests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 404a1c438f2970109cd9b84852f18551defa757c
User & Date: rkeene on 2015-09-14 19:04:20
Other Links: manifest | tags
Context
2015-10-07
02:38
Fix hard-coded use of './kit' in the kitsh build script and improve how the kit target name is defined. check-in: f84245cd51 user: mistachkin tags: trunk
2015-09-14
19:04
Updated to include timeout for tests check-in: 404a1c438f user: rkeene tags: trunk
2015-08-05
03:27
Updated URL to tcllib check-in: faeac9b5b2 user: rkeene tags: trunk
Changes

Modified build/test/test from [df35486eb4] to [b787f2bb27].

493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521

522
523

524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
493
494
495
496
497
498
499















500
501
502
503
504
505

506
507

508
509
510
511
512
513
514
515
516
517
518
519
520
521





522
523
524
525
526
527
528







-
-
-
-
-
-
-
-
-
-
-
-
-
-
-






-
+

-
+













-
-
-
-
-







		## 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"

			# If a command is required to start the kit, prepare to kill it
			# in case of timeout.
			## Temporarily disabled since currently it is causing
			## more problems in the form of tests being killed
			## prematurely than we are having issues with tests
			## hanging
			kitrunkillpid=""
			if [ "1" = "0" -a -n "${kitruncmd}" ]; then
				(
					sleep 120
					killall "$(basename "${outputname}")" >/dev/null 2>/dev/null
				) >/dev/null 2>/dev/null &
				kitrunkillpid="$!"
			fi

			(
				if [ -f "${testscppre}" ]; then
					. "${testscppre}"
				fi

				if [ "${kitdll}" = "1" ]; then
					${kitruncmd} "${outputname}-tclsh" "${testscp}" "${outputname}" "${kit}" "${version}"
					timeout -k 10 600 ${kitruncmd} "${outputname}-tclsh" "${testscp}" "${outputname}" "${kit}" "${version}"
				else
					${kitruncmd} "${outputname}" "${testscp}" "${outputname}" "${kit}" "${version}"
					timeout -k 10 600 ${kitruncmd} "${outputname}" "${testscp}" "${outputname}" "${kit}" "${version}"
				fi
			) > "${scplogfile}" 2>&1

			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

			# Kill the watchdog for this iteration
			if [ -n "${kitrunkillpid}" ]; then
				kill -9 "${kitrunkillpid}" >/dev/null 2>/dev/null
			fi

			echo "${testscp_tag}: PASS" >>  "${testresultslog}"

			rm -f "${scplogfile}"
		done

		if [ -f "${outputname}-origname" ]; then
			rm -f "${createdkit}"