Diff

Differences From Artifact [db5cad6f63]:

To Artifact [6cafb5c1e8]:


12
13
14
15
16
17
18


19
20
21
22
23
24
25
26
27













28
29
30
31
32
33
34
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49







+
+









+
+
+
+
+
+
+
+
+
+
+
+
+







rm -rf "${WEBDIR}"
mkdir -p "${WEBDIR}" || exit 1

cp -r kits/* "${WEBDIR}"

ln -s ../index.ttml "${WEBDIR}/" >/dev/null 2>/dev/null

totaltests_count="$(ls -1 tests/*.tcl | wc -l)"

for file in "${WEBDIR}"/*; do
	if [ -d "${file}" ]; then
		continue
	fi

	if echo "${file}" | egrep '\.(log|desc|ttml)$' >/dev/null; then
		continue
	fi

	# Find out which tests failed
	failedtests_count="0"
	failedtests=""
	for faillog in "${file}"-[0-9][0-9]-*.log; do
		if [ ! -f "${faillog}" ]; then
			continue
		fi

		failedtests_count=$[${failedtests} + 1]
		failedtests="${failedtests} $(basename "${faillog}")"
	done

	# Generate description
	descfile="${file}.desc"
	shortfile="$(basename "${file}")"
	desc=""

	tclversion="$(echo "${shortfile}" | cut -f 2 -d -)"
	parts="$(echo "${shortfile}" | cut -f 3- -d -)"

81
82
83
84
85
86
87

88
89
90
91
92
93
94
95





96
97
98
99
100
101
102
103
104
105
106
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

120

121
122
123
124
125







+








+
+
+
+
+



-

-





		fi
	done

	if [ -z "${desc}" ]; then
		continue
	fi

	# Generate better Tcl version
	case "${tclversion}" in
		cvs_HEAD)
			tclversion="from CVS HEAD"
			;;
		cvs_*)
			tclversion="from CVS tag $(echo "${tclversion}" | cut -f 2 -d _)"
			;;
	esac

	# Update description with count of failed tests
	if [ "${failedtests_count}" != "0" ]; then
		desc="${desc} (FAILED ${failedtests_count} of ${totaltests_count} tests)"
	fi

	desc="is a Tclkit for Tcl ${tclversion}${desc}"

	echo "${desc}" > "${descfile}"
done


rmdir "${WEBDIR}/failed" >/dev/null 2>/dev/null
ln -s ../index.ttml "${WEBDIR}/failed/" >/dev/null 2>/dev/null

exit 0