Diff

Differences From Artifact [df35486eb4]:

To Artifact [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
		## 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}"
				else
					${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}"







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|

|













<
<
<
<
<







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 [ -f "${testscppre}" ]; then
					. "${testscppre}"
				fi

				if [ "${kitdll}" = "1" ]; then
					timeout -k 10 600 ${kitruncmd} "${outputname}-tclsh" "${testscp}" "${outputname}" "${kit}" "${version}"
				else
					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






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

			rm -f "${scplogfile}"
		done

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