1 |
548 |
jeremybenn |
#!/bin/bash
|
2 |
|
|
|
3 |
|
|
# Copyright (C) 2010 Embecosm Limited
|
4 |
|
|
|
5 |
|
|
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
|
6 |
|
|
|
7 |
|
|
# This file is a script to run each group of GNU tests manually
|
8 |
|
|
|
9 |
|
|
# This program is free software; you can redistribute it and/or modify it
|
10 |
|
|
# under the terms of the GNU General Public License as published by the Free
|
11 |
|
|
# Software Foundation; either version 3 of the License, or (at your option)
|
12 |
|
|
# any later version.
|
13 |
|
|
|
14 |
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
15 |
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
16 |
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
17 |
|
|
# more details.
|
18 |
|
|
|
19 |
|
|
# You should have received a copy of the GNU General Public License along
|
20 |
|
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
21 |
|
|
|
22 |
|
|
# ------------------------------------------------------------------------------
|
23 |
|
|
|
24 |
|
|
# For each block of tests we run the tests on a target machine. There are no
|
25 |
|
|
# arguments. The IP address of the target machines are found in the file
|
26 |
|
|
# `dirname ${DEJAGNU}`/ip-avail.txt
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
# Set global variables
|
30 |
|
|
function set_globals {
|
31 |
|
|
root_dir=`dirname ${DEJAGNU}`
|
32 |
|
|
ip_file=${root_dir}/ip-avail.txt
|
33 |
|
|
boards_dir=${root_dir}/boards
|
34 |
|
|
board_file=${boards_dir}/or32-linux-sim.exp
|
35 |
|
|
tmp_count=/tmp/rat-sema-$$
|
36 |
|
|
lockfile=/tmp/rat-lockfile-$$
|
37 |
|
|
ip_count=`wc -l ${ip_file} | cut -d " " -f 1`
|
38 |
|
|
}
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
# Set the count file
|
42 |
|
|
|
43 |
|
|
# @param[in] $1 The count to set.
|
44 |
|
|
function set_count {
|
45 |
|
|
|
46 |
|
|
# Lock all the file manipulation.
|
47 |
|
|
(
|
48 |
|
|
flock -e 201
|
49 |
|
|
echo $1 > ${tmp_count}
|
50 |
|
|
) 201> ${lockfile}
|
51 |
|
|
}
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
# Get the count file
|
55 |
|
|
|
56 |
|
|
# @return The current count
|
57 |
|
|
function get_count {
|
58 |
|
|
|
59 |
|
|
# Lock all the file manipulation.
|
60 |
|
|
(
|
61 |
|
|
cat ${tmp_count}
|
62 |
|
|
) 201> ${lockfile}
|
63 |
|
|
}
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
# Decrement the count file if it is not already zero
|
67 |
|
|
|
68 |
|
|
# @return 0 if we suceed in decrementing, 1 otherwise
|
69 |
|
|
function dec_count {
|
70 |
|
|
|
71 |
|
|
# Lock all the file manipulation. Result will be result of function
|
72 |
|
|
(
|
73 |
|
|
flock -e 201
|
74 |
|
|
val=`cat ${tmp_count}`
|
75 |
|
|
|
76 |
|
|
if [ ${val} -gt 0 ]
|
77 |
|
|
then
|
78 |
|
|
(( val-- ))
|
79 |
|
|
echo ${val} > ${tmp_count}
|
80 |
|
|
return 0
|
81 |
|
|
else
|
82 |
|
|
return 1
|
83 |
|
|
fi
|
84 |
|
|
) 201> ${lockfile}
|
85 |
|
|
}
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
# Increment the count file
|
89 |
|
|
|
90 |
|
|
# @return 0 if we do decrement, 1 if we don't
|
91 |
|
|
function inc_count {
|
92 |
|
|
|
93 |
|
|
# Lock all the file manipulation.
|
94 |
|
|
(
|
95 |
|
|
flock -e 201
|
96 |
|
|
val=`cat ${tmp_count}`
|
97 |
|
|
(( val++ ))
|
98 |
|
|
echo ${val} > ${tmp_count}
|
99 |
|
|
) 201> ${lockfile}
|
100 |
|
|
}
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
# See if telnet or ftp is working
|
104 |
|
|
|
105 |
|
|
# We call the program with a sequence
|
106 |
|
|
|
107 |
|
|
# command (telnet or ftp)
|
108 |
|
|
# wait for prompt ("telnet> "or "ftp> ")
|
109 |
|
|
# send open <ip address>
|
110 |
|
|
# wait for prompt ("login: " or "Name (<ip address>:<user>): ")
|
111 |
|
|
# send root
|
112 |
|
|
# wait for prompt ("# " or "ftp> ")
|
113 |
|
|
# send exit
|
114 |
|
|
# wait for closing message ("Connection closed by foreign host." or
|
115 |
|
|
# "221 Operation successful")
|
116 |
|
|
|
117 |
|
|
# @param[in] $1 The command to use (ftp or telnet)
|
118 |
|
|
# @param[in] $2 The IP address
|
119 |
|
|
# @param[in] $3 The connection prompt (regular expression)
|
120 |
|
|
# @param[in] $4 The operational prompt (regular expression)
|
121 |
|
|
# @param[in] $5 The closing message (regular expression)
|
122 |
|
|
|
123 |
|
|
# @return 0 on success, non-zero otherwise.
|
124 |
|
|
function check_remote_command {
|
125 |
|
|
|
126 |
|
|
command=$1
|
127 |
|
|
ip=$2
|
128 |
|
|
conn_prompt=$3
|
129 |
|
|
op_prompt=$4
|
130 |
|
|
close_mess=$5
|
131 |
|
|
|
132 |
|
|
expect -f - <<EOF > /dev/null 2>&1
|
133 |
|
|
spawn "${command}"
|
134 |
|
|
|
135 |
|
|
set timeout 2
|
136 |
|
|
expect {
|
137 |
|
|
"${command}> " {}
|
138 |
|
|
timeout {exit 1}
|
139 |
|
|
}
|
140 |
|
|
|
141 |
|
|
send "open ${ip}\n"
|
142 |
|
|
|
143 |
|
|
set timeout 5
|
144 |
|
|
expect {
|
145 |
|
|
-re "${conn_prompt}" {}
|
146 |
|
|
timeout {exit 2}
|
147 |
|
|
}
|
148 |
|
|
|
149 |
|
|
send "root\n"
|
150 |
|
|
|
151 |
|
|
set timeout 2
|
152 |
|
|
expect {
|
153 |
|
|
-re "${op_prompt}" {}
|
154 |
|
|
timeout {exit 3}
|
155 |
|
|
}
|
156 |
|
|
|
157 |
|
|
send "exit\n"
|
158 |
|
|
|
159 |
|
|
set timeout 5
|
160 |
|
|
expect {
|
161 |
|
|
-re "${close_mess}" {exit 0}
|
162 |
|
|
timeout {exit 4}
|
163 |
|
|
}
|
164 |
|
|
EOF
|
165 |
|
|
|
166 |
|
|
return $?
|
167 |
|
|
}
|
168 |
|
|
|
169 |
|
|
|
170 |
|
|
# See if telnet is working.
|
171 |
|
|
|
172 |
|
|
# We call check_remote_command with appropriate arguments
|
173 |
|
|
|
174 |
|
|
# @param[in] $1 The IP address
|
175 |
|
|
|
176 |
|
|
# @return 0 on success, non-zero otherwise.
|
177 |
|
|
function check_telnet {
|
178 |
|
|
check_remote_command telnet $1 "^.* login: " "^.*# " \
|
179 |
|
|
"Connection closed by foreign host."
|
180 |
|
|
|
181 |
|
|
return $?
|
182 |
|
|
}
|
183 |
|
|
|
184 |
|
|
|
185 |
|
|
# See if FTP is working.
|
186 |
|
|
|
187 |
|
|
# We call check_remote_command with appropriate arguments
|
188 |
|
|
|
189 |
|
|
# @param[in] $1 The IP address
|
190 |
|
|
|
191 |
|
|
# @return 0 on success, non-zero otherwise.
|
192 |
|
|
|
193 |
|
|
function check_ftp {
|
194 |
|
|
check_remote_command ftp $1 "Name \\\($1:.*\\\): " "ftp> " \
|
195 |
|
|
"221 Operation successful"
|
196 |
|
|
|
197 |
|
|
return $?
|
198 |
|
|
}
|
199 |
|
|
|
200 |
|
|
|
201 |
|
|
# See if telnet and FTP are working.
|
202 |
|
|
|
203 |
|
|
# We combine calls to check_telnet and check_ftp. Note that we do check both,
|
204 |
|
|
# even though we really only need to check one for failure. However in the
|
205 |
|
|
# future the additional information may be useful.
|
206 |
|
|
|
207 |
|
|
# @param[in] $1 The IP address
|
208 |
|
|
|
209 |
|
|
# @return 0 on success, non-zero (10 x telnet failure + ftp failure)
|
210 |
|
|
# otherwise.
|
211 |
|
|
function check_telnet_ftp {
|
212 |
|
|
check_telnet $1
|
213 |
|
|
res_telnet=$?
|
214 |
|
|
check_ftp $1
|
215 |
|
|
res_ftp=$?
|
216 |
|
|
|
217 |
|
|
return $(( $res_telnet * 10 + $res_ftp ))
|
218 |
|
|
}
|
219 |
|
|
|
220 |
|
|
|
221 |
|
|
# Run one block of tests. The arguments in order are:
|
222 |
|
|
|
223 |
|
|
# @param[in] $1 the test directory
|
224 |
|
|
# @param[in] $2 the source directory
|
225 |
|
|
# @param[in] $3 the name of the tool
|
226 |
|
|
# @param[in] $4 the base name of the test file & test file name.
|
227 |
|
|
# @param[in] $5 an index (increments on each retry)
|
228 |
|
|
|
229 |
|
|
# @return 0 if the IP address is still alive at the end of the test, 1 if it
|
230 |
|
|
# is not.
|
231 |
|
|
function run_test_block {
|
232 |
|
|
test_dir=$1
|
233 |
|
|
src_dir=$2
|
234 |
|
|
tool=$3
|
235 |
|
|
test_base=`echo $4 | sed -e 's/#.*$//'`
|
236 |
|
|
test_file=`echo $4 | sed -e 's/^.*#//' -e 's/%/ /g'`
|
237 |
|
|
index=$5
|
238 |
|
|
|
239 |
|
|
echo "test_dir=${test_dir}"
|
240 |
|
|
echo "src_dir=${src_dir}"
|
241 |
|
|
echo "tool=${tool}"
|
242 |
|
|
echo "test_base=${test_base}"
|
243 |
|
|
echo "test_file=${test_file}"
|
244 |
|
|
|
245 |
|
|
log_file="${test_base}.log"
|
246 |
|
|
sum_file="${test_base}.sum"
|
247 |
|
|
res_dir="${tool}/${test_base}"
|
248 |
|
|
|
249 |
|
|
# Run the tests, with the result in a directory of its own.
|
250 |
|
|
echo "Running ${test_file}"
|
251 |
|
|
mkdir -p ${test_dir}
|
252 |
|
|
cd ${test_dir}
|
253 |
|
|
mkdir -p ${res_dir}
|
254 |
|
|
|
255 |
|
|
runtest -v -v -v --target=or32-linux \
|
256 |
|
|
--srcdir=${src_dir} \
|
257 |
|
|
--tool=${tool} \
|
258 |
|
|
--outdir=${res_dir} \
|
259 |
|
|
--objdir=${test_dir}/${tool} \
|
260 |
|
|
"${test_file}"
|
261 |
|
|
|
262 |
|
|
# Use sed to get rid of irritating ctrl-M characters and move the files to
|
263 |
|
|
# the main results directory.
|
264 |
|
|
sed -e 's/\r//g' < ${res_dir}/${tool}.log > ${tool}/${log_file}
|
265 |
|
|
sed -e 's/\r//g' < ${res_dir}/${tool}.sum > ${tool}/${sum_file}
|
266 |
|
|
rm -rf ${res_dir}
|
267 |
|
|
|
268 |
|
|
# If the telnet or FTP to the IP address is dead, we assume the test
|
269 |
|
|
# failed, the target machine having died (at last partially), so we return
|
270 |
|
|
# failure.
|
271 |
|
|
ip=`sed < ${tool}/${log_file} -n -e 's/OR32 target hostname is //p'`
|
272 |
|
|
if check_telnet_ftp ${ip}
|
273 |
|
|
then
|
274 |
|
|
echo "Running ${test_file} on ${ip} completed successfully"
|
275 |
|
|
res=0
|
276 |
|
|
else
|
277 |
|
|
echo "Running ${test_file} on ${ip} died"
|
278 |
|
|
mv ${tool}/${log_file} ${tool}/${log_file}-failed-$$-${index}
|
279 |
|
|
mv ${tool}/${sum_file} ${tool}/${sum_file}-failed-$$-${index}
|
280 |
|
|
${root_dir}/get-ip.sh --delete ${ip}
|
281 |
|
|
res=1
|
282 |
|
|
fi
|
283 |
|
|
|
284 |
|
|
cd - > /dev/null 2>&1
|
285 |
|
|
return ${res}
|
286 |
|
|
|
287 |
|
|
}
|
288 |
|
|
|
289 |
|
|
|
290 |
|
|
# Create a site.exp file in the test directory. This is automatically done
|
291 |
|
|
# with automake, but we must do it by hand. The arguments are:
|
292 |
|
|
# the test directory
|
293 |
|
|
function create_local_config {
|
294 |
|
|
test_dir=$1
|
295 |
|
|
shift
|
296 |
|
|
cf=${test_dir}/site.exp
|
297 |
|
|
|
298 |
|
|
# This omits setting TEST_GCC_EXEC_PREFIX (to "/opt/or32-new/lib/gcc/")
|
299 |
|
|
# and LDFLAGS (appends "
|
300 |
|
|
# -L/home/jeremy/svntrunk/GNU/or32/bd-linux/gcc/../ld"). These values are
|
301 |
|
|
# only set for gcc/g++ in the original automake anyway.
|
302 |
|
|
echo "set rootme \"${test_dir}/..\"" > ${cf}
|
303 |
|
|
echo "set host_triplet i686-pc-linux-gnu" >> ${cf}
|
304 |
|
|
echo "set build_triplet i686-pc-linux-gnu" >> ${cf}
|
305 |
|
|
echo "set target_triplet or32-unknown-linux-gnu" >> ${cf}
|
306 |
|
|
echo "set target_alias or32-linux" >> ${cf}
|
307 |
|
|
echo "set libiconv \"\"" >> ${cf}
|
308 |
|
|
echo "set CFLAGS \"\"" >> ${cf}
|
309 |
|
|
echo "set CXXFLAGS \"\"" >> ${cf}
|
310 |
|
|
echo "set HOSTCC \"gcc\"" >> ${cf}
|
311 |
|
|
echo "set HOSTCFLAGS \"-g -O2\"" >> ${cf}
|
312 |
|
|
echo "set TESTING_IN_BUILD_TREE 1" >> ${cf}
|
313 |
|
|
echo "set HAVE_LIBSTDCXX_V3 1" >> ${cf}
|
314 |
|
|
echo "set ENABLE_PLUGIN 1" >> ${cf}
|
315 |
|
|
echo "set PLUGINCC \"gcc\"" >> ${cf}
|
316 |
|
|
echo "set PLUGINCFLAGS \"-g \"" >> ${cf}
|
317 |
|
|
echo "set GMPINC \"\"" >> ${cf}
|
318 |
|
|
echo "append LDFLAGS \" -L${test_dir}/../../ld\"" >> ${cf}
|
319 |
|
|
echo "set tmpdir \"${test_dir}\"" >> ${cf}
|
320 |
|
|
}
|
321 |
|
|
|
322 |
|
|
|
323 |
|
|
# Run all the tests for a tool. The arguments in order are:
|
324 |
|
|
# the test directory
|
325 |
|
|
# the source directory
|
326 |
|
|
# the name of the tool
|
327 |
|
|
# All the test base names
|
328 |
|
|
function run_tool_tests {
|
329 |
|
|
test_dir=$1
|
330 |
|
|
shift
|
331 |
|
|
src_dir=$1
|
332 |
|
|
shift
|
333 |
|
|
tool=$1
|
334 |
|
|
shift
|
335 |
|
|
|
336 |
|
|
# Create the local config file for DejaGnu
|
337 |
|
|
create_local_config ${test_dir}
|
338 |
|
|
|
339 |
|
|
for t in $*
|
340 |
|
|
do
|
341 |
|
|
# Wait until an IP address is free
|
342 |
|
|
until dec_count
|
343 |
|
|
do
|
344 |
|
|
sleep 1
|
345 |
|
|
done
|
346 |
|
|
|
347 |
|
|
# Run the test in the background
|
348 |
|
|
(
|
349 |
|
|
index=1
|
350 |
|
|
until run_test_block ${test_dir} ${src_dir} ${tool} ${t} ${index}
|
351 |
|
|
do
|
352 |
|
|
index=$(( ${index} + 1 ))
|
353 |
|
|
done
|
354 |
|
|
|
355 |
|
|
inc_count
|
356 |
|
|
) &
|
357 |
|
|
done
|
358 |
|
|
}
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
# Initalize all the global variables.
|
362 |
|
|
set_globals $*
|
363 |
|
|
set_count ${ip_count}
|
364 |
|
|
|
365 |
|
|
# Where to find gcc/g++ tests
|
366 |
|
|
gcc_test_dir=${root_dir}/bd-linux/gcc/testsuite
|
367 |
|
|
gcc_src_dir=${root_dir}/unisrc/gcc/testsuite
|
368 |
|
|
|
369 |
|
|
# The list of GCC tests to run. These are the tests actually used in make
|
370 |
|
|
# check-gcc. The test is a test base name followed by the .exp file name. Most
|
371 |
|
|
# of them are target specific and do nothing.
|
372 |
|
|
td=${gcc_src_dir}/gcc.c-torture
|
373 |
|
|
exec1_list=`cd ${td}; echo execute/200[0-1]*`
|
374 |
|
|
exec2_list=`cd ${td}; echo execute/200[2-3]* execute/20[1-9]*`
|
375 |
|
|
exec3_list=`cd ${td}; echo execute/200[4-9]*`
|
376 |
|
|
exec4_list=`cd ${td}; echo execute/[013-89][0-4]*`
|
377 |
|
|
exec5_list=`cd ${td}; echo execute/[013-89][5-9]*`
|
378 |
|
|
exec6_list=`cd ${td}; echo execute/[abc-lABC-L]*`
|
379 |
|
|
exec7_list=`cd ${td}; echo execute/p[^r]* execute/pr[0-3]*`
|
380 |
|
|
exec8_list=`cd ${td}; echo execute/pr[^0-3]* execute/[mnMNq-zQ-Z]*`
|
381 |
|
|
|
382 |
|
|
exec1_list=`echo ${exec1_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
383 |
|
|
exec2_list=`echo ${exec2_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
384 |
|
|
exec3_list=`echo ${exec3_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
385 |
|
|
exec4_list=`echo ${exec4_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
386 |
|
|
exec5_list=`echo ${exec5_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
387 |
|
|
exec6_list=`echo ${exec6_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
388 |
|
|
exec7_list=`echo ${exec7_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
389 |
|
|
exec8_list=`echo ${exec8_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
390 |
|
|
|
391 |
|
|
gcc_test_list="aapcs#aapcs.exp \
|
392 |
|
|
abi-avx#abi-avx.exp \
|
393 |
|
|
abi-x86_64#abi-x86_64.exp \
|
394 |
|
|
acker1#acker1.exp \
|
395 |
|
|
alpha#alpha.exp \
|
396 |
|
|
arm#arm.exp \
|
397 |
|
|
arm-isr#arm-isr.exp \
|
398 |
|
|
autopar#autopar.exp \
|
399 |
|
|
avr#avr.exp \
|
400 |
|
|
avr-torture#avr-torture.exp \
|
401 |
|
|
bfin#bfin.exp \
|
402 |
|
|
bprob#bprob.exp \
|
403 |
|
|
builtins#builtins.exp \
|
404 |
|
|
callabi#callabi.exp \
|
405 |
|
|
charset#charset.exp \
|
406 |
|
|
compat#compat.exp \
|
407 |
|
|
compile#compile.exp \
|
408 |
|
|
cpp#cpp.exp \
|
409 |
|
|
cris#cris.exp \
|
410 |
|
|
cris-torture#cris-torture.exp \
|
411 |
|
|
debug#debug.exp \
|
412 |
|
|
dectest#dectest.exp \
|
413 |
|
|
dfp#dfp.exp \
|
414 |
|
|
dg#dg.exp \
|
415 |
|
|
dg-torture#dg-torture.exp \
|
416 |
|
|
dhry#dhry.exp \
|
417 |
|
|
dwarf2#dwarf2.exp \
|
418 |
|
|
ea#ea.exp \
|
419 |
|
|
execute-1#execute.exp=${exec1_list} \
|
420 |
|
|
execute-2#execute.exp=${exec2_list} \
|
421 |
|
|
execute-3#execute.exp=${exec3_list} \
|
422 |
|
|
execute-4#execute.exp=${exec4_list} \
|
423 |
|
|
execute-5#execute.exp=${exec5_list} \
|
424 |
|
|
execute-6#execute.exp=${exec6_list} \
|
425 |
|
|
execute-7#execute.exp=${exec7_list} \
|
426 |
|
|
execute-8#execute.exp=${exec8_list} \
|
427 |
|
|
fixed-point#fixed-point.exp \
|
428 |
|
|
format#format.exp \
|
429 |
|
|
frv#frv.exp \
|
430 |
|
|
gcov#gcov.exp \
|
431 |
|
|
gomp#gomp.exp \
|
432 |
|
|
graphite#graphite.exp \
|
433 |
|
|
guality#guality.exp \
|
434 |
|
|
help#help.exp \
|
435 |
|
|
i386-costmodel-vect#i386-costmodel-vect.exp \
|
436 |
|
|
i386#i386.exp \
|
437 |
|
|
i386-prefetch#i386-prefetch.exp \
|
438 |
|
|
ia64#ia64.exp \
|
439 |
|
|
ieee#ieee.exp \
|
440 |
|
|
ipa#ipa.exp \
|
441 |
|
|
linkage#linkage.exp \
|
442 |
|
|
lto#lto.exp \
|
443 |
|
|
m68k#m68k.exp \
|
444 |
|
|
math-torture#math-torture.exp \
|
445 |
|
|
matrix1#matrix1.exp \
|
446 |
|
|
matrix#matrix.exp \
|
447 |
|
|
mg-2#mg-2.exp \
|
448 |
|
|
mg#mg.exp \
|
449 |
|
|
mips16-inter#mips16-inter.exp \
|
450 |
|
|
mips-abi#mips-abi.exp \
|
451 |
|
|
mips#mips.exp \
|
452 |
|
|
mips-nonpic#mips-nonpic.exp \
|
453 |
|
|
neon#neon.exp \
|
454 |
|
|
noncompile#noncompile.exp \
|
455 |
|
|
options#options.exp \
|
456 |
|
|
pch#pch.exp \
|
457 |
|
|
plugin#plugin.exp \
|
458 |
|
|
powerpc#powerpc.exp \
|
459 |
|
|
ppc-costmodel-vect#ppc-costmodel-vect.exp \
|
460 |
|
|
rx#rx.exp \
|
461 |
|
|
s390#s390.exp \
|
462 |
|
|
sh#sh.exp \
|
463 |
|
|
sieve#sieve.exp \
|
464 |
|
|
sort2#sort2.exp \
|
465 |
|
|
sparc#sparc.exp \
|
466 |
|
|
special#special.exp \
|
467 |
|
|
spu-costmodel-vect#spu-costmodel-vect.exp \
|
468 |
|
|
spu#spu.exp \
|
469 |
|
|
stackalign#stackalign.exp \
|
470 |
|
|
struct-layout-1#struct-layout-1.exp \
|
471 |
|
|
struct-reorg#struct-reorg.exp \
|
472 |
|
|
test-framework#test-framework.exp \
|
473 |
|
|
tls#tls.exp \
|
474 |
|
|
trad#trad.exp \
|
475 |
|
|
tree-prof#tree-prof.exp \
|
476 |
|
|
tree-ssa#tree-ssa.exp \
|
477 |
|
|
unsorted#unsorted.exp \
|
478 |
|
|
vect#vect.exp \
|
479 |
|
|
vmx#vmx.exp \
|
480 |
|
|
vxworks#vxworks.exp \
|
481 |
|
|
weak#weak.exp \
|
482 |
|
|
x86_64-costmodel-vect#x86_64-costmodel-vect.exp \
|
483 |
|
|
xstormy16#xstormy16.exp"
|
484 |
|
|
|
485 |
|
|
# The list of G++ tests to run. These are the tests actually used in make
|
486 |
|
|
# check-gcc. The test is a test base name followed by the .exp file name.
|
487 |
|
|
gpp_test_list="bprob#bprob.exp \
|
488 |
|
|
charset#charset.exp \
|
489 |
|
|
compat#compat.exp \
|
490 |
|
|
debug#debug.exp \
|
491 |
|
|
dfp#dfp.exp \
|
492 |
|
|
dg#dg.exp \
|
493 |
|
|
dg-torture#dg-torture.exp \
|
494 |
|
|
dwarf2#dwarf2.exp \
|
495 |
|
|
ecos#ecos.exp \
|
496 |
|
|
gcov#gcov.exp \
|
497 |
|
|
gomp#gomp.exp \
|
498 |
|
|
graphite#graphite.exp \
|
499 |
|
|
lto#lto.exp \
|
500 |
|
|
old-deja#old-deja.exp \
|
501 |
|
|
pch#pch.exp \
|
502 |
|
|
plugin#plugin.exp \
|
503 |
|
|
stackalign#stackalign.exp \
|
504 |
|
|
struct-layout-1#struct-layout-1.exp \
|
505 |
|
|
tls#tls.exp \
|
506 |
|
|
tree-prof#tree-prof.exp \
|
507 |
|
|
unix#unix.exp"
|
508 |
|
|
|
509 |
|
|
# Where to find libstdc++-v3 tests
|
510 |
|
|
lib_test_dir=${root_dir}/bd-linux/or32-linux/libstdc++-v3/testsuite
|
511 |
|
|
lib_src_dir=${root_dir}/unisrc/libstdc++-v3/testsuite
|
512 |
|
|
|
513 |
|
|
# The list of libstdc++-v3 tests to run. These are the tests actually used in
|
514 |
|
|
# make check-libstdc++-v3. The test is a test base name followed by the .exp
|
515 |
|
|
# file name.
|
516 |
|
|
conf1_list=`cd ${lib_src_dir}; echo [ab]* de* p*/*`
|
517 |
|
|
conf2_list=`cd ${lib_src_dir}; echo e*/[a-m]*`
|
518 |
|
|
conf3_list=`cd ${lib_src_dir}; echo e*/n*`
|
519 |
|
|
conf4_list=`cd ${lib_src_dir}; echo e*/pb*`
|
520 |
|
|
conf5_list=`cd ${lib_src_dir}; echo e*/po* e*/pr*`
|
521 |
|
|
conf6_list=`cd ${lib_src_dir}; echo e*/[^a-p]*`
|
522 |
|
|
conf7_list=`cd ${lib_src_dir}; echo [013-9]*/* 20_*/*`
|
523 |
|
|
conf8_list=`cd ${lib_src_dir}; echo 21_*/*`
|
524 |
|
|
conf9_list=`cd ${lib_src_dir}; echo 22_*/*`
|
525 |
|
|
conf10_list=`cd ${lib_src_dir}; echo 23_*/[a-m]*`
|
526 |
|
|
conf11_list=`cd ${lib_src_dir}; echo 23_*/[^a-m]*`
|
527 |
|
|
conf12_list=`cd ${lib_src_dir}; echo 24_*/* 25_*/*`
|
528 |
|
|
conf13_list=`cd ${lib_src_dir}; echo 26_*/*`
|
529 |
|
|
conf14_list=`cd ${lib_src_dir}; echo 27_*/basic_f*`
|
530 |
|
|
conf15_list=`cd ${lib_src_dir}; echo 27_*/basic_s*`
|
531 |
|
|
conf16_list=`cd ${lib_src_dir}; echo 27_*/basic_i*`
|
532 |
|
|
conf17_list=`cd ${lib_src_dir}; echo 27_*/basic_of*`
|
533 |
|
|
conf18_list=`cd ${lib_src_dir}; echo 27_*/basic_os*`
|
534 |
|
|
conf19_list=`cd ${lib_src_dir}; echo 27_*/[^b]* 2[8-9]_*/*`
|
535 |
|
|
conf20_list=`cd ${lib_src_dir}; echo t*/[0-5]*`
|
536 |
|
|
conf21_list=`cd ${lib_src_dir}; echo t*/[^0-5]*`
|
537 |
|
|
|
538 |
|
|
conf1_list=`echo ${conf1_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
539 |
|
|
conf2_list=`echo ${conf2_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
540 |
|
|
conf3_list=`echo ${conf3_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
541 |
|
|
conf4_list=`echo ${conf4_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
542 |
|
|
conf5_list=`echo ${conf5_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
543 |
|
|
conf6_list=`echo ${conf6_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
544 |
|
|
conf7_list=`echo ${conf7_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
545 |
|
|
conf8_list=`echo ${conf8_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
546 |
|
|
conf9_list=`echo ${conf9_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
547 |
|
|
conf10_list=`echo ${conf10_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
548 |
|
|
conf11_list=`echo ${conf11_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
549 |
|
|
conf12_list=`echo ${conf12_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
550 |
|
|
conf13_list=`echo ${conf13_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
551 |
|
|
conf14_list=`echo ${conf14_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
552 |
|
|
conf15_list=`echo ${conf15_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
553 |
|
|
conf16_list=`echo ${conf16_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
554 |
|
|
conf17_list=`echo ${conf17_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
555 |
|
|
conf18_list=`echo ${conf18_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
556 |
|
|
conf19_list=`echo ${conf19_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
557 |
|
|
conf20_list=`echo ${conf20_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
558 |
|
|
conf21_list=`echo ${conf21_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
|
559 |
|
|
|
560 |
|
|
lib_test_list="abi#abi.exp \
|
561 |
|
|
conformance-1#conformance.exp=${conf1_list} \
|
562 |
|
|
conformance-2#conformance.exp=${conf2_list} \
|
563 |
|
|
conformance-3#conformance.exp=${conf3_list} \
|
564 |
|
|
conformance-4#conformance.exp=${conf4_list} \
|
565 |
|
|
conformance-5#conformance.exp=${conf5_list} \
|
566 |
|
|
conformance-6#conformance.exp=${conf6_list} \
|
567 |
|
|
conformance-7#conformance.exp=${conf7_list} \
|
568 |
|
|
conformance-8#conformance.exp=${conf8_list} \
|
569 |
|
|
conformance-9#conformance.exp=${conf9_list} \
|
570 |
|
|
conformance-10#conformance.exp=${conf10_list} \
|
571 |
|
|
conformance-11#conformance.exp=${conf11_list} \
|
572 |
|
|
conformance-12#conformance.exp=${conf12_list} \
|
573 |
|
|
conformance-13#conformance.exp=${conf13_list} \
|
574 |
|
|
conformance-14#conformance.exp=${conf14_list} \
|
575 |
|
|
conformance-15#conformance.exp=${conf15_list} \
|
576 |
|
|
conformance-16#conformance.exp=${conf16_list} \
|
577 |
|
|
conformance-17#conformance.exp=${conf17_list} \
|
578 |
|
|
conformance-18#conformance.exp=${conf18_list} \
|
579 |
|
|
conformance-19#conformance.exp=${conf19_list} \
|
580 |
|
|
conformance-20#conformance.exp=${conf20_list} \
|
581 |
|
|
conformance-21#conformance.exp=${conf21_list}"
|
582 |
|
|
|
583 |
|
|
run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "gcc" ${gcc_test_list}
|
584 |
|
|
run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "g++" ${gpp_test_list}
|
585 |
|
|
run_tool_tests ${lib_test_dir} ${lib_src_dir} "libstdc++" ${lib_test_list}
|
586 |
|
|
|
587 |
|
|
# Wait for all the tests to finish
|
588 |
|
|
while [ `get_count` != "${ip_count}" ]
|
589 |
|
|
do
|
590 |
|
|
sleep 1
|
591 |
|
|
done
|