summaryrefslogtreecommitdiff
path: root/scripts/testheader.inc
blob: 44b5585add626325c92ea6beb696918eec095958 (plain)
1
2
3
4
5
6
7
8
9
10
11
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
ARCH=`make -f scripts/test/Makefile ARCH`
DATE=`date +%Y%m%d`
LOGFILE=build-results-${DATE}-${ARCH}.log
function mk()
{
	scripts/mkpkg $1 $2 "$3"			| tee -a ${LOGFILE}
}

function	header()
{
	echo "#!/bin/sh"				| tee -a ${LOGFILE}
	echo "source \"scripts/testheader.inc\""
	
}

active=1
busybox=0

function	SKIP()
{
	echo SKIP					| tee -a ${LOGFILE}
	active=0
}

function	RESTART()
{
	echo RESTART					| tee -a ${LOGFILE}
	active=1
}

function	EXE()
{
	printf 	"EXE	"				| tee -a ${LOGFILE}
	if [ ${active} = 1 ] ; then
		$1 $2 $3 "$4"
		return 0;
	else
		printf	"%-8s"	"$1"			| tee -a ${LOGFILE}
		printf	"%-32s"	"$2"			| tee -a ${LOGFILE}
		printf	"%-16s"	"$3"			| tee -a ${LOGFILE}
		if [ "${4}X" != "X" ] ; then
			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
		fi
		echo					| tee -a ${LOGFILE}
		return 1;
	fi
}

function	AVR()
{
	printf 	"AVR	"				| tee -a ${LOGFILE}
	if [ "${ARCH}X" = "avr32X" ] ; then
		echo "mk $2 UNSUPPORTED \"$4\" $5 $6"	| tee -a ${LOGFILE}
		return 1;
	elif [ ${active} = 1 ] ; then
		$1 $2 "$3" "$4"
		return 0;
	else
		printf	"%-8s"	"$1"			| tee -a ${LOGFILE}
		printf	"%-32s"	"$2"			| tee -a ${LOGFILE}
		printf	"%-16s"	"$3"			| tee -a ${LOGFILE}
		if [ "${4}X" != "X" ] ; then
			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
		fi
		echo					| tee -a ${LOGFILE}
		return 1;
	fi
}


function skip()
{
	printf "skip	%-8s" "$1"			| tee -a ${LOGFILE}
	printf "%-32s" "$2"				| tee -a ${LOGFILE}
	if [   "$3X" = "OKX" ] ; then
		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
		if [ "${4}X" != "X" ] ; then
			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
		fi
	elif [ "$3X" = "FAILX" ] ; then
		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
		if [ "${4}X" != "X" ] ; then
			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
		fi
	elif [ "$3X" = "BROKENX" ] ; then
		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
		if [ "${4}X" != "X" ] ; then
			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
		fi
	elif [ "$3X" = "DISABLEDX" ] ; then
		printf "%-16s"	"DISABLED"		| tee -a ${LOGFILE}
		if [ "${4}X" != "X" ] ; then
			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
		fi
	else
		printf "%-16s"	"DISABLED" 		| tee -a ${LOGFILE}
		if [ "${4}X" != "X" ] ; then
			printf	"%-64s"	"\"$4\""	| tee -a ${LOGFILE}
		fi
	fi
	echo						| tee -a ${LOGFILE}
}

function bb()
{
	printf 	"%-8s"	"bb"				| tee -a ${LOGFILE}
	if [ ${busybox} = 1 ] ; then
		printf "%-8s"	"$1"			| tee -a ${LOGFILE}
		$1 $2 $3 $4 $5 $6
		return 0;
	else
		echo "$1	$2 $3 $4 $5 $6"		| tee -a ${LOGFILE}
		return 1;
	fi
}

function	comment()
{
	echo	"comment	$1"			| tee -a ${LOGFILE}
}

# Enable HASERL
sed -i s/.*BR2_PACKAGE_HASERL.*// .config
echo "# BR2_PACKAGE_HASERL_VERSION_0_8_X is not set" >> .config
echo "BR2_PACKAGE_HASERL_VERSION_0_9_X=y" >> .config
echo "BR2_PACKAGE_HASERL_VERSION=\"0.9.25\"" >> .config
echo "BR2_PACKAGE_HASERL=y" >> .config
# Enable SSL
sed -i s/.*BR2_PACKAGE_OPENSSL.*// .config
echo "BR2_PACKAGE_OPENSSL=y" >> .config
# Enable socat
sed -i s/.*BR2_PACKAGE_SOCAT.*// .config
echo "BR2_PACKAGE_SOCAT=y" >> .config
echo "BR2_PACKAGE_SOCAT_PREDEF_CRDLY_SHIFT=\"9\"" >> .config
echo "BR2_PACKAGE_SOCAT_PREDEF_TABDLY_SHIFT=\"11\"" >> .config
echo "BR2_PACKAGE_SOCAT_PREDEF_CSIZE_SHIFT=\"4\"" >> .config
# Enable Freetype
sed -i s/.*BR2_PACKAGE_FREETYPE.*// .config
echo "BR2_PACKAGE_FREETYPE=y" >> .config
sed -i s/.*BR2_FREETYPE_VERSION.*// .config
echo "# BR2_FREETYPE_VERSION_2_2_1 is not set" >> .config
echo "BR2_FREETYPE_VERSION_2_3_7=y" >> .config
echo "BR2_FREETYPE_VERSION=\"2.3.7\"" >> .config