URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk
- from Rev 547 to Rev 548
- ↔ Reverse comparison
Rev 547 → Rev 548
/gnu-src/bld-all.sh
100,7 → 100,7
# Source directory for newlib (default newlib-1.18.0) |
|
# --uclibc-dir |
# Source directory for uClibc (default uclibc-0.9.31) |
# Source directory for uClibc (default uclibc-0.9.32) |
|
# --gdb-dir |
# Source directory for gdb (default gdb-7.2) |
177,9 → 177,9
binutils_dir="binutils-2.20.1" |
gcc_dir="gcc-4.5.1" |
newlib_dir="newlib-1.18.0" |
uclibc_dir="uclibc-0.9.31" |
uclibc_dir="uclibc-0.9.32" |
gdb_dir="gdb-7.2" |
linux_dir="linux-2.6.37" |
linux_dir="linux-2.6.39" |
or32_elf_flag="true" |
or32_linux_flag="true" |
link_flag="true" |
399,7 → 399,7
Source directory for newlib (default newlib-1.18.0) |
|
--uclibc-dir |
Source directory for uClibc (default uclibc-0.9.31) |
Source directory for uClibc (default uclibc-0.9.32) |
|
--gdb-dir |
Source directory for gdb (default gdb-7.2) |
/gnu-src/stop-linuxes.sh
0,0 → 1,49
#!/bin/bash |
|
# Copyright (C) 2011 Embecosm Limited |
|
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
# This file is a script to stop a group of Linux instances |
|
# This program is free software; you can redistribute it and/or modify it |
# under the terms of the GNU General Public License as published by the Free |
# Software Foundation; either version 3 of the License, or (at your option) |
# any later version. |
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
# more details. |
|
|
# You should have received a copy of the GNU General Public License along |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
|
# ------------------------------------------------------------------------------ |
|
# Stop up a batch of linux sessions. |
|
# The input for this is a string of PIDs - the output of start-linuxes.sh. We |
# use the PID to kill the Linux process. |
|
for pid in $* |
do |
# Find all the processes of which this is parent and kill them |
for cpid in `ps h --ppid ${pid} | sed -e 's/ *\([[:digit:]]*\).*$/\1/'` |
do |
kill -KILL ${cpid} > /dev/null 2>&1 |
done |
|
# Kill the main process. Using -INT should allow the session to finish |
# writing to the log. |
kill -INT ${pid} > /dev/null 2>&1 |
kill -HUP ${pid} > /dev/null 2>&1 |
|
done |
|
# We could add more brutal commands here to get rid of xterms and TUN/TAP |
# connections. However this would just kill everything, not the named linuxes, |
# potentially inconveniencing others. |
# kill `ps x | grep 'xterm *-S.*/.*' | sed -e 's/\(.....\).*$/\1/'` |
# fuser -k /dev/net/tun |
gnu-src/stop-linuxes.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: gnu-src/run-all-tests.sh
===================================================================
--- gnu-src/run-all-tests.sh (nonexistent)
+++ gnu-src/run-all-tests.sh (revision 548)
@@ -0,0 +1,591 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Embecosm Limited
+
+# Contributor Jeremy Bennett
+
+# This file is a script to run each group of GNU tests manually
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3 of the License, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see .
+
+# ------------------------------------------------------------------------------
+
+# For each block of tests we run the tests on a target machine. There are no
+# arguments. The IP address of the target machines are found in the file
+# `dirname ${DEJAGNU}`/ip-avail.txt
+
+
+# Set global variables
+function set_globals {
+ root_dir=`dirname ${DEJAGNU}`
+ ip_file=${root_dir}/ip-avail.txt
+ boards_dir=${root_dir}/boards
+ board_file=${boards_dir}/or32-linux-sim.exp
+ tmp_count=/tmp/rat-sema-$$
+ lockfile=/tmp/rat-lockfile-$$
+ ip_count=`wc -l ${ip_file} | cut -d " " -f 1`
+ }
+
+
+# Set the count file
+
+# @param[in] $1 The count to set.
+function set_count {
+
+ # Lock all the file manipulation.
+ (
+ flock -e 201
+ echo $1 > ${tmp_count}
+ ) 201> ${lockfile}
+}
+
+
+# Get the count file
+
+# @return The current count
+function get_count {
+
+ # Lock all the file manipulation.
+ (
+ cat ${tmp_count}
+ ) 201> ${lockfile}
+}
+
+
+# Decrement the count file if it is not already zero
+
+# @return 0 if we suceed in decrementing, 1 otherwise
+function dec_count {
+
+ # Lock all the file manipulation. Result will be result of function
+ (
+ flock -e 201
+ val=`cat ${tmp_count}`
+
+ if [ ${val} -gt 0 ]
+ then
+ (( val-- ))
+ echo ${val} > ${tmp_count}
+ return 0
+ else
+ return 1
+ fi
+ ) 201> ${lockfile}
+}
+
+
+# Increment the count file
+
+# @return 0 if we do decrement, 1 if we don't
+function inc_count {
+
+ # Lock all the file manipulation.
+ (
+ flock -e 201
+ val=`cat ${tmp_count}`
+ (( val++ ))
+ echo ${val} > ${tmp_count}
+ ) 201> ${lockfile}
+}
+
+
+# See if telnet or ftp is working
+
+# We call the program with a sequence
+
+# command (telnet or ftp)
+# wait for prompt ("telnet> "or "ftp> ")
+# send open
+# wait for prompt ("login: " or "Name (:): ")
+# send root
+# wait for prompt ("# " or "ftp> ")
+# send exit
+# wait for closing message ("Connection closed by foreign host." or
+# "221 Operation successful")
+
+# @param[in] $1 The command to use (ftp or telnet)
+# @param[in] $2 The IP address
+# @param[in] $3 The connection prompt (regular expression)
+# @param[in] $4 The operational prompt (regular expression)
+# @param[in] $5 The closing message (regular expression)
+
+# @return 0 on success, non-zero otherwise.
+function check_remote_command {
+
+ command=$1
+ ip=$2
+ conn_prompt=$3
+ op_prompt=$4
+ close_mess=$5
+
+ expect -f - < /dev/null 2>&1
+ spawn "${command}"
+
+ set timeout 2
+ expect {
+ "${command}> " {}
+ timeout {exit 1}
+ }
+
+ send "open ${ip}\n"
+
+ set timeout 5
+ expect {
+ -re "${conn_prompt}" {}
+ timeout {exit 2}
+ }
+
+ send "root\n"
+
+ set timeout 2
+ expect {
+ -re "${op_prompt}" {}
+ timeout {exit 3}
+ }
+
+ send "exit\n"
+
+ set timeout 5
+ expect {
+ -re "${close_mess}" {exit 0}
+ timeout {exit 4}
+ }
+EOF
+
+ return $?
+}
+
+
+# See if telnet is working.
+
+# We call check_remote_command with appropriate arguments
+
+# @param[in] $1 The IP address
+
+# @return 0 on success, non-zero otherwise.
+function check_telnet {
+ check_remote_command telnet $1 "^.* login: " "^.*# " \
+ "Connection closed by foreign host."
+
+ return $?
+}
+
+
+# See if FTP is working.
+
+# We call check_remote_command with appropriate arguments
+
+# @param[in] $1 The IP address
+
+# @return 0 on success, non-zero otherwise.
+
+function check_ftp {
+ check_remote_command ftp $1 "Name \\\($1:.*\\\): " "ftp> " \
+ "221 Operation successful"
+
+ return $?
+}
+
+
+# See if telnet and FTP are working.
+
+# We combine calls to check_telnet and check_ftp. Note that we do check both,
+# even though we really only need to check one for failure. However in the
+# future the additional information may be useful.
+
+# @param[in] $1 The IP address
+
+# @return 0 on success, non-zero (10 x telnet failure + ftp failure)
+# otherwise.
+function check_telnet_ftp {
+ check_telnet $1
+ res_telnet=$?
+ check_ftp $1
+ res_ftp=$?
+
+ return $(( $res_telnet * 10 + $res_ftp ))
+}
+
+
+# Run one block of tests. The arguments in order are:
+
+# @param[in] $1 the test directory
+# @param[in] $2 the source directory
+# @param[in] $3 the name of the tool
+# @param[in] $4 the base name of the test file & test file name.
+# @param[in] $5 an index (increments on each retry)
+
+# @return 0 if the IP address is still alive at the end of the test, 1 if it
+# is not.
+function run_test_block {
+ test_dir=$1
+ src_dir=$2
+ tool=$3
+ test_base=`echo $4 | sed -e 's/#.*$//'`
+ test_file=`echo $4 | sed -e 's/^.*#//' -e 's/%/ /g'`
+ index=$5
+
+ echo "test_dir=${test_dir}"
+ echo "src_dir=${src_dir}"
+ echo "tool=${tool}"
+ echo "test_base=${test_base}"
+ echo "test_file=${test_file}"
+
+ log_file="${test_base}.log"
+ sum_file="${test_base}.sum"
+ res_dir="${tool}/${test_base}"
+
+ # Run the tests, with the result in a directory of its own.
+ echo "Running ${test_file}"
+ mkdir -p ${test_dir}
+ cd ${test_dir}
+ mkdir -p ${res_dir}
+
+ runtest -v -v -v --target=or32-linux \
+ --srcdir=${src_dir} \
+ --tool=${tool} \
+ --outdir=${res_dir} \
+ --objdir=${test_dir}/${tool} \
+ "${test_file}"
+
+ # Use sed to get rid of irritating ctrl-M characters and move the files to
+ # the main results directory.
+ sed -e 's/\r//g' < ${res_dir}/${tool}.log > ${tool}/${log_file}
+ sed -e 's/\r//g' < ${res_dir}/${tool}.sum > ${tool}/${sum_file}
+ rm -rf ${res_dir}
+
+ # If the telnet or FTP to the IP address is dead, we assume the test
+ # failed, the target machine having died (at last partially), so we return
+ # failure.
+ ip=`sed < ${tool}/${log_file} -n -e 's/OR32 target hostname is //p'`
+ if check_telnet_ftp ${ip}
+ then
+ echo "Running ${test_file} on ${ip} completed successfully"
+ res=0
+ else
+ echo "Running ${test_file} on ${ip} died"
+ mv ${tool}/${log_file} ${tool}/${log_file}-failed-$$-${index}
+ mv ${tool}/${sum_file} ${tool}/${sum_file}-failed-$$-${index}
+ ${root_dir}/get-ip.sh --delete ${ip}
+ res=1
+ fi
+
+ cd - > /dev/null 2>&1
+ return ${res}
+
+}
+
+
+# Create a site.exp file in the test directory. This is automatically done
+# with automake, but we must do it by hand. The arguments are:
+# the test directory
+function create_local_config {
+ test_dir=$1
+ shift
+ cf=${test_dir}/site.exp
+
+ # This omits setting TEST_GCC_EXEC_PREFIX (to "/opt/or32-new/lib/gcc/")
+ # and LDFLAGS (appends "
+ # -L/home/jeremy/svntrunk/GNU/or32/bd-linux/gcc/../ld"). These values are
+ # only set for gcc/g++ in the original automake anyway.
+ echo "set rootme \"${test_dir}/..\"" > ${cf}
+ echo "set host_triplet i686-pc-linux-gnu" >> ${cf}
+ echo "set build_triplet i686-pc-linux-gnu" >> ${cf}
+ echo "set target_triplet or32-unknown-linux-gnu" >> ${cf}
+ echo "set target_alias or32-linux" >> ${cf}
+ echo "set libiconv \"\"" >> ${cf}
+ echo "set CFLAGS \"\"" >> ${cf}
+ echo "set CXXFLAGS \"\"" >> ${cf}
+ echo "set HOSTCC \"gcc\"" >> ${cf}
+ echo "set HOSTCFLAGS \"-g -O2\"" >> ${cf}
+ echo "set TESTING_IN_BUILD_TREE 1" >> ${cf}
+ echo "set HAVE_LIBSTDCXX_V3 1" >> ${cf}
+ echo "set ENABLE_PLUGIN 1" >> ${cf}
+ echo "set PLUGINCC \"gcc\"" >> ${cf}
+ echo "set PLUGINCFLAGS \"-g \"" >> ${cf}
+ echo "set GMPINC \"\"" >> ${cf}
+ echo "append LDFLAGS \" -L${test_dir}/../../ld\"" >> ${cf}
+ echo "set tmpdir \"${test_dir}\"" >> ${cf}
+}
+
+
+# Run all the tests for a tool. The arguments in order are:
+# the test directory
+# the source directory
+# the name of the tool
+# All the test base names
+function run_tool_tests {
+ test_dir=$1
+ shift
+ src_dir=$1
+ shift
+ tool=$1
+ shift
+
+ # Create the local config file for DejaGnu
+ create_local_config ${test_dir}
+
+ for t in $*
+ do
+ # Wait until an IP address is free
+ until dec_count
+ do
+ sleep 1
+ done
+
+ # Run the test in the background
+ (
+ index=1
+ until run_test_block ${test_dir} ${src_dir} ${tool} ${t} ${index}
+ do
+ index=$(( ${index} + 1 ))
+ done
+
+ inc_count
+ ) &
+ done
+}
+
+
+# Initalize all the global variables.
+set_globals $*
+set_count ${ip_count}
+
+# Where to find gcc/g++ tests
+gcc_test_dir=${root_dir}/bd-linux/gcc/testsuite
+gcc_src_dir=${root_dir}/unisrc/gcc/testsuite
+
+# The list of GCC tests to run. These are the tests actually used in make
+# check-gcc. The test is a test base name followed by the .exp file name. Most
+# of them are target specific and do nothing.
+td=${gcc_src_dir}/gcc.c-torture
+exec1_list=`cd ${td}; echo execute/200[0-1]*`
+exec2_list=`cd ${td}; echo execute/200[2-3]* execute/20[1-9]*`
+exec3_list=`cd ${td}; echo execute/200[4-9]*`
+exec4_list=`cd ${td}; echo execute/[013-89][0-4]*`
+exec5_list=`cd ${td}; echo execute/[013-89][5-9]*`
+exec6_list=`cd ${td}; echo execute/[abc-lABC-L]*`
+exec7_list=`cd ${td}; echo execute/p[^r]* execute/pr[0-3]*`
+exec8_list=`cd ${td}; echo execute/pr[^0-3]* execute/[mnMNq-zQ-Z]*`
+
+exec1_list=`echo ${exec1_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+exec2_list=`echo ${exec2_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+exec3_list=`echo ${exec3_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+exec4_list=`echo ${exec4_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+exec5_list=`echo ${exec5_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+exec6_list=`echo ${exec6_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+exec7_list=`echo ${exec7_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+exec8_list=`echo ${exec8_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+
+gcc_test_list="aapcs#aapcs.exp \
+ abi-avx#abi-avx.exp \
+ abi-x86_64#abi-x86_64.exp \
+ acker1#acker1.exp \
+ alpha#alpha.exp \
+ arm#arm.exp \
+ arm-isr#arm-isr.exp \
+ autopar#autopar.exp \
+ avr#avr.exp \
+ avr-torture#avr-torture.exp \
+ bfin#bfin.exp \
+ bprob#bprob.exp \
+ builtins#builtins.exp \
+ callabi#callabi.exp \
+ charset#charset.exp \
+ compat#compat.exp \
+ compile#compile.exp \
+ cpp#cpp.exp \
+ cris#cris.exp \
+ cris-torture#cris-torture.exp \
+ debug#debug.exp \
+ dectest#dectest.exp \
+ dfp#dfp.exp \
+ dg#dg.exp \
+ dg-torture#dg-torture.exp \
+ dhry#dhry.exp \
+ dwarf2#dwarf2.exp \
+ ea#ea.exp \
+ execute-1#execute.exp=${exec1_list} \
+ execute-2#execute.exp=${exec2_list} \
+ execute-3#execute.exp=${exec3_list} \
+ execute-4#execute.exp=${exec4_list} \
+ execute-5#execute.exp=${exec5_list} \
+ execute-6#execute.exp=${exec6_list} \
+ execute-7#execute.exp=${exec7_list} \
+ execute-8#execute.exp=${exec8_list} \
+ fixed-point#fixed-point.exp \
+ format#format.exp \
+ frv#frv.exp \
+ gcov#gcov.exp \
+ gomp#gomp.exp \
+ graphite#graphite.exp \
+ guality#guality.exp \
+ help#help.exp \
+ i386-costmodel-vect#i386-costmodel-vect.exp \
+ i386#i386.exp \
+ i386-prefetch#i386-prefetch.exp \
+ ia64#ia64.exp \
+ ieee#ieee.exp \
+ ipa#ipa.exp \
+ linkage#linkage.exp \
+ lto#lto.exp \
+ m68k#m68k.exp \
+ math-torture#math-torture.exp \
+ matrix1#matrix1.exp \
+ matrix#matrix.exp \
+ mg-2#mg-2.exp \
+ mg#mg.exp \
+ mips16-inter#mips16-inter.exp \
+ mips-abi#mips-abi.exp \
+ mips#mips.exp \
+ mips-nonpic#mips-nonpic.exp \
+ neon#neon.exp \
+ noncompile#noncompile.exp \
+ options#options.exp \
+ pch#pch.exp \
+ plugin#plugin.exp \
+ powerpc#powerpc.exp \
+ ppc-costmodel-vect#ppc-costmodel-vect.exp \
+ rx#rx.exp \
+ s390#s390.exp \
+ sh#sh.exp \
+ sieve#sieve.exp \
+ sort2#sort2.exp \
+ sparc#sparc.exp \
+ special#special.exp \
+ spu-costmodel-vect#spu-costmodel-vect.exp \
+ spu#spu.exp \
+ stackalign#stackalign.exp \
+ struct-layout-1#struct-layout-1.exp \
+ struct-reorg#struct-reorg.exp \
+ test-framework#test-framework.exp \
+ tls#tls.exp \
+ trad#trad.exp \
+ tree-prof#tree-prof.exp \
+ tree-ssa#tree-ssa.exp \
+ unsorted#unsorted.exp \
+ vect#vect.exp \
+ vmx#vmx.exp \
+ vxworks#vxworks.exp \
+ weak#weak.exp \
+ x86_64-costmodel-vect#x86_64-costmodel-vect.exp \
+ xstormy16#xstormy16.exp"
+
+# The list of G++ tests to run. These are the tests actually used in make
+# check-gcc. The test is a test base name followed by the .exp file name.
+gpp_test_list="bprob#bprob.exp \
+ charset#charset.exp \
+ compat#compat.exp \
+ debug#debug.exp \
+ dfp#dfp.exp \
+ dg#dg.exp \
+ dg-torture#dg-torture.exp \
+ dwarf2#dwarf2.exp \
+ ecos#ecos.exp \
+ gcov#gcov.exp \
+ gomp#gomp.exp \
+ graphite#graphite.exp \
+ lto#lto.exp \
+ old-deja#old-deja.exp \
+ pch#pch.exp \
+ plugin#plugin.exp \
+ stackalign#stackalign.exp \
+ struct-layout-1#struct-layout-1.exp \
+ tls#tls.exp \
+ tree-prof#tree-prof.exp \
+ unix#unix.exp"
+
+# Where to find libstdc++-v3 tests
+lib_test_dir=${root_dir}/bd-linux/or32-linux/libstdc++-v3/testsuite
+lib_src_dir=${root_dir}/unisrc/libstdc++-v3/testsuite
+
+# The list of libstdc++-v3 tests to run. These are the tests actually used in
+# make check-libstdc++-v3. The test is a test base name followed by the .exp
+# file name.
+conf1_list=`cd ${lib_src_dir}; echo [ab]* de* p*/*`
+conf2_list=`cd ${lib_src_dir}; echo e*/[a-m]*`
+conf3_list=`cd ${lib_src_dir}; echo e*/n*`
+conf4_list=`cd ${lib_src_dir}; echo e*/pb*`
+conf5_list=`cd ${lib_src_dir}; echo e*/po* e*/pr*`
+conf6_list=`cd ${lib_src_dir}; echo e*/[^a-p]*`
+conf7_list=`cd ${lib_src_dir}; echo [013-9]*/* 20_*/*`
+conf8_list=`cd ${lib_src_dir}; echo 21_*/*`
+conf9_list=`cd ${lib_src_dir}; echo 22_*/*`
+conf10_list=`cd ${lib_src_dir}; echo 23_*/[a-m]*`
+conf11_list=`cd ${lib_src_dir}; echo 23_*/[^a-m]*`
+conf12_list=`cd ${lib_src_dir}; echo 24_*/* 25_*/*`
+conf13_list=`cd ${lib_src_dir}; echo 26_*/*`
+conf14_list=`cd ${lib_src_dir}; echo 27_*/basic_f*`
+conf15_list=`cd ${lib_src_dir}; echo 27_*/basic_s*`
+conf16_list=`cd ${lib_src_dir}; echo 27_*/basic_i*`
+conf17_list=`cd ${lib_src_dir}; echo 27_*/basic_of*`
+conf18_list=`cd ${lib_src_dir}; echo 27_*/basic_os*`
+conf19_list=`cd ${lib_src_dir}; echo 27_*/[^b]* 2[8-9]_*/*`
+conf20_list=`cd ${lib_src_dir}; echo t*/[0-5]*`
+conf21_list=`cd ${lib_src_dir}; echo t*/[^0-5]*`
+
+conf1_list=`echo ${conf1_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf2_list=`echo ${conf2_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf3_list=`echo ${conf3_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf4_list=`echo ${conf4_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf5_list=`echo ${conf5_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf6_list=`echo ${conf6_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf7_list=`echo ${conf7_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf8_list=`echo ${conf8_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf9_list=`echo ${conf9_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf10_list=`echo ${conf10_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf11_list=`echo ${conf11_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf12_list=`echo ${conf12_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf13_list=`echo ${conf13_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf14_list=`echo ${conf14_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf15_list=`echo ${conf15_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf16_list=`echo ${conf16_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf17_list=`echo ${conf17_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf18_list=`echo ${conf18_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf19_list=`echo ${conf19_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf20_list=`echo ${conf20_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+conf21_list=`echo ${conf21_list} | sed -e 's/ /* /g' -e 's/$/*/' -e 's/ /%/g'`
+
+lib_test_list="abi#abi.exp \
+ conformance-1#conformance.exp=${conf1_list} \
+ conformance-2#conformance.exp=${conf2_list} \
+ conformance-3#conformance.exp=${conf3_list} \
+ conformance-4#conformance.exp=${conf4_list} \
+ conformance-5#conformance.exp=${conf5_list} \
+ conformance-6#conformance.exp=${conf6_list} \
+ conformance-7#conformance.exp=${conf7_list} \
+ conformance-8#conformance.exp=${conf8_list} \
+ conformance-9#conformance.exp=${conf9_list} \
+ conformance-10#conformance.exp=${conf10_list} \
+ conformance-11#conformance.exp=${conf11_list} \
+ conformance-12#conformance.exp=${conf12_list} \
+ conformance-13#conformance.exp=${conf13_list} \
+ conformance-14#conformance.exp=${conf14_list} \
+ conformance-15#conformance.exp=${conf15_list} \
+ conformance-16#conformance.exp=${conf16_list} \
+ conformance-17#conformance.exp=${conf17_list} \
+ conformance-18#conformance.exp=${conf18_list} \
+ conformance-19#conformance.exp=${conf19_list} \
+ conformance-20#conformance.exp=${conf20_list} \
+ conformance-21#conformance.exp=${conf21_list}"
+
+run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "gcc" ${gcc_test_list}
+run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "g++" ${gpp_test_list}
+run_tool_tests ${lib_test_dir} ${lib_src_dir} "libstdc++" ${lib_test_list}
+
+# Wait for all the tests to finish
+while [ `get_count` != "${ip_count}" ]
+do
+ sleep 1
+done
gnu-src/run-all-tests.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: gnu-src/check-results.sh
===================================================================
--- gnu-src/check-results.sh (nonexistent)
+++ gnu-src/check-results.sh (revision 548)
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Embecosm Limited
+
+# Contributor Jeremy Bennett
+
+# This file is a script to count the results from a set of test directories.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3 of the License, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see .
+
+# ------------------------------------------------------------------------------
+
+# Look for the different GNU results in different directories. We put the
+# results to a temporary file, to allow us to suck out the summary as well.
+
+# The argument is the list of log files to process.
+
+tmpf=/tmp/check-results-$$
+
+# Get the individual results if we have any. Note that we don't check for the
+# strings at start of line, since they may have FTP prompts showing.
+echo " PASS FAIL XPASS XFAIL UNRES UNSUP UNTES TOTAL"
+
+if ls $* > /dev/null 2>&1
+then
+ for logfile in $*
+ do
+ logfile_base=`basename ${logfile}`
+ tname=`echo ${logfile_base} | sed -e 's/\.log//'`
+ p=`grep 'PASS:' ${logfile} | grep -v 'XPASS' | wc -l`
+ f=`grep 'FAIL:' ${logfile} | grep -v 'XFAIL' | wc -l`
+ xp=`grep 'XPASS:' ${logfile} | wc -l`
+ xf=`grep 'XFAIL:' ${logfile} | wc -l`
+ ur=`grep 'UNRESOLVED:' ${logfile} | wc -l`
+ us=`grep 'UNSUPPORTED:' ${logfile} | wc -l`
+ ut=`grep 'UNTESTED:' ${logfile} | wc -l`
+ tot=`echo "${p} ${f} + ${xp} + ${xf} + ${ur} + ${us} + ${ut} + p" | dc`
+ printf "%-25s %5d %5d %5d %5d %5d %5d %5d %5d\n" \
+ ${tname} ${p} ${f} ${xp} ${xf} ${ur} ${us} ${ut} ${tot} | \
+ tee -a ${tmpf}
+ done
+fi
+
+# Total each column, if we have any results
+if ls $* > /dev/null 2>&1
+then
+ pt=`cut -c 27-31 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+ ft=`cut -c 33-37 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+ xpt=`cut -c 39-43 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+ xft=`cut -c 45-49 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+ urt=`cut -c 51-55 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+ ust=`cut -c 57-61 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+ utt=`cut -c 63-67 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+ tott=`cut -c 69-73 ${tmpf} | sed -e '2,$s/$/ +/' -e '$s/$/ p/' | dc`
+else
+ pt=0
+ ft=0
+ xpt=0
+ xft=0
+ urt=0
+ ust=0
+ utt=0
+ tott=0
+fi
+
+rm -f ${tmpf}
+
+echo "----- ----- ----- ----- ----- ----- ----- ----- -----"
+printf "TOTAL %5d %5d %5d %5d %5d %5d %5d %5d\n" \
+ ${pt} ${ft} ${xpt} ${xft} ${urt} ${ust} ${utt} ${tott}
+
gnu-src/check-results.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: gnu-src/start-linuxes.sh
===================================================================
--- gnu-src/start-linuxes.sh (nonexistent)
+++ gnu-src/start-linuxes.sh (revision 548)
@@ -0,0 +1,279 @@
+#!/bin/bash
+
+# Copyright (C) 2011 Embecosm Limited
+
+# Contributor Jeremy Bennett
+
+# This file is a script to start up a group of Linux instances
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3 of the License, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see .
+
+# ------------------------------------------------------------------------------
+
+# Start up a batch of linux sessions ready for testing.
+
+# There are a number of ways of starting up vmlinux to force a particular IP
+# address to be used, which are specified by the first argument
+
+# DHCP - Linux will get an IP address via DHCP. In this case we must poll
+# the router to get the newly created IP address.
+
+# STATIC - We force Linux to chose a static address, by an explicit ifconfig
+# in the etc/init.d/rcS of the initramfs. We need to select an IP
+# address that is not currently being used.
+
+# In both cases, potentially we get in a mess if someone else is starting up
+# sessions at this time.
+
+
+# ------------------------------------------------------------------------------
+# Tell the user how to use this command
+
+# If we are doing STATIC startup, the must be followed by IP
+# addresses.
+# ------------------------------------------------------------------------------
+function bad_args {
+ echo "Usage: start-linuxes.sh DHCP|STATIC [ ... ]"
+ echo " - Number of Linux sessions to start up"
+ echo " - Linux directory"
+ echo " - IP addresses (only if STATIC)"
+}
+
+
+# ------------------------------------------------------------------------------
+# Check the args
+
+# Remote machine name is optional. For argument usage, see function bad_args.
+
+# @param[in] $1 Type of processing (DHCP or STATIC)
+# @pmara[in] $2 Count of Linux instances to start
+# @param[in] $3 Linux directory
+# @param[in] $4 ... IP addresses if static startup
+# ------------------------------------------------------------------------------
+function get_args {
+ # Check We have at least the first two arguments
+ if [ $# -lt 3 ]
+ then
+ bad_args
+ exit 1
+ fi
+
+ type=$1
+ shift
+ count=$1
+ shift
+ linux_dir=$1
+ shift
+
+ # Check type and get static IP addresses
+ case "x${type}" in
+ "xSTATIC" )
+ # Get all the IP addresses
+ for (( i=0 ; i < ${count} ; i++ ))
+ do
+ if [ "x${i}" == "x" ]
+ then
+ bad_args
+ exit 1
+ fi
+
+ ip_list[${i}]=$1
+ shift
+ done
+ ;;
+
+ "xDHCP" )
+ # No extra args for DHCP
+ ;;
+
+ "x*" )
+ # Not recognized
+ bad_args
+ exit 1
+ ;;
+ esac
+}
+
+
+# ------------------------------------------------------------------------------
+# Allocate an unused TAP device
+
+# We need /dev/tap?? that is not being used at present. We have a custom
+# program to do this.
+
+# @return The TAP to use.
+# ------------------------------------------------------------------------------
+function allocate_tap {
+ for (( i=0 ; ${i} < 20 ; i=${i} + 1 ))
+ do
+ if ./check-tap "tap${i}"
+ then
+ echo "tap${i}"
+ exit
+ fi
+ done
+}
+
+
+# ------------------------------------------------------------------------------
+# Start up one STATIC instance
+
+# We need to edit the IP address into rcS, rebuild Linux and start Linux using
+# the next available TAP.
+
+# This could go wrong if someone else starts up a machine at the same time. We
+# could reserve an unlikely block to avoid this, and flock this code, to avoid
+# another instance causing trouble. For now we leave it unprotected.
+
+# @param[in] $1 An index number of this instance
+# @param[in] $2 The IP address to use
+
+# @return The Linux process ID
+# ------------------------------------------------------------------------------
+function start_one_static {
+
+ ip=$2
+
+ # A new Linux instance will require a new TAP in its config
+ tap=`allocate_tap $*`
+
+ # Edit the Or1ksim configuration file to use the allocated TAP
+ sed -i -e "s/^\( *tap_dev *= *\).*$/\1\"$tap\"/" \
+ ${linux_dir}/arch/openrisc/or1ksim_eth.cfg
+
+ # Edit the Linux rcS file and rebuild
+ sed -i -e "s/ifconfig eth0.*up/ifconfig eth0 ${ip} up/" \
+ ${linux_dir}/arch/openrisc/support/initramfs/etc/init.d/rcS
+
+ cd ${linux_dir}
+ make vmlinux ARCH=openrisc CROSS_COMPILE=/opt/or32-new/bin/or32-elf- \
+ > /dev/null 2>&1
+
+ if [ $? != 0 ];
+ then
+ echo "start-linux.sh: 'make vmlinux' failed"
+ exit 1
+ fi
+
+ cd - > /dev/null 2>&1
+
+ # Start up Linux and allow time for the ramdisk to unpack, by waiting
+ # until ping to the IP address is OK.
+ or32-elf-sim -f ${linux_dir}/arch/openrisc/or1ksim_eth.cfg \
+ ${linux_dir}/vmlinux \
+ > `hostname`-linux-console-$$-$1.log 2>&1 & linux_pid=$!
+
+ until ping -c 1 -q ${ip} > /dev/null 2>&1
+ do
+ sleep 1
+ done
+
+ # make us nicer than normal, then return the new process ID
+ renice +1 ${linux_pid} > /dev/null 2>&1
+ echo "${linux_pid}"
+}
+
+
+# ------------------------------------------------------------------------------
+# Start up one DHCP instance
+
+# Start up Linux using the next available TAP.
+
+# @param[in] $1 An index number of this instance
+
+# @return The Linux process ID
+# ------------------------------------------------------------------------------
+function start_one_dhcp {
+ # A new Linux instance will require a new TAP in its config
+ tap=`allocate_tap $*`
+
+ # Edit the Or1ksim configuration file to use the allocated TAP
+ sed -i -e "s/^\( *tap_dev *= *\).*$/\1\"$tap\"/" \
+ ${linux_dir}/arch/openrisc/or1ksim_eth.cfg
+
+ # Start up Linux
+ or32-elf-sim -f ${linux_dir}/arch/openrisc/or1ksim_eth.cfg \
+ ${linux_dir}/vmlinux > `hostname`-linux-output-$$-$1 2>&1 & linux_pid=$!
+
+ # make us nicer than normal, then return the new process ID
+ renice +1 ${linux_pid} > /dev/null 2>&1
+ echo "${linux_pid}"
+
+}
+
+
+# ------------------------------------------------------------------------------
+# Start up using DHCP on the local machine
+
+# We wait for 30 seconds between each Linux startup, to avoid flooding the
+# DHCP server.
+
+# @return A list of IP address of the Linux instances
+# ------------------------------------------------------------------------------
+function start_all_dhcp {
+ echo "DHCP startup in progress..."
+
+ for (( i=0 ; ${i} < ${count} ; i=${i} + 1 ))
+ do
+ one_res=`start_one_dhcp ${i}`
+ res="${res} ${one_res}"
+ sleep 30
+ done
+
+ echo ${res}
+}
+
+
+# ------------------------------------------------------------------------------
+# Start up using STATIC on the local machine
+# ------------------------------------------------------------------------------
+function start_all_static {
+ echo "STATIC startup in progress..."
+
+ for (( i=0 ; ${i} < ${count} ; i=${i} + 1 ))
+ do
+ one_res=`start_one_static ${i} ${ip_list[${i}]}`
+ res="${res} ${one_res}"
+ done
+
+ echo ${res}
+}
+
+
+# ------------------------------------------------------------------------------
+# Main program
+# ------------------------------------------------------------------------------
+
+# Some useful files
+tmp1=/tmp/start-linuxes-1-$$
+tmp2=/tmp/start-linuxes-2-$$
+
+# Check the arguments
+get_args $*
+
+# Start Linuxes
+case "${type}" in
+ "DHCP" )
+ start_all_dhcp
+ ;;
+
+ "STATIC" )
+ start_all_static
+ ;;
+
+ "*" )
+ echo "Abort at line ${LINENO} in ${BASH_SOURCE[0]}"
+ exit 255
+ ;;
+esac
gnu-src/start-linuxes.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: gnu-src/bld-bb.sh
===================================================================
--- gnu-src/bld-bb.sh (revision 547)
+++ gnu-src/bld-bb.sh (revision 548)
@@ -20,7 +20,7 @@
# with this program. If not, see .
bb_dir=busybox-1.17.3
-linux_dir=linux-2.6.37
+linux_dir=linux-2.6.39
# Clean, build and install BusyBox
echo "bld-bb.sh: Rebuilding BusyBox"
/gnu-src/get-ip.sh
0,0 → 1,71
#!/bin/bash |
|
# Copyright (C) 2010 Embecosm Limited |
|
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
# A script to get the IP of the next available Linux session |
|
# This program is free software; you can redistribute it and/or modify it |
# under the terms of the GNU General Public License as published by the Free |
# Software Foundation; either version 3 of the License, or (at your option) |
# any later version. |
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
# more details. |
|
# You should have received a copy of the GNU General Public License along |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
|
# ------------------------------------------------------------------------------ |
|
# Usage |
|
# ./get-ip.sh [--rotate] [--delete <ip_address>] |
|
# Get the top IP address from a file of addresses, rotating it to the bottom |
# of the file if --rotate is specified. Delete the given IP address if |
# --delete is specified. |
|
ipfile=`dirname ${DEJAGNU}`/ip-avail.txt |
tmp=/tmp/get-ip-$$ |
lockfile=`dirname ${DEJAGNU}`/get-ip-lockfile |
arg1=$1 |
arg2=$2 |
|
# Lock all the file manipulation. |
( |
flock -e 200 |
|
# Check we have an IP address available |
if [ ! -s ${ipfile} ] |
then |
echo "No IP addresses available" >&2 |
exit 255 |
fi |
|
# Get the top IP address |
ip=`head -1 ${ipfile}` |
|
# Optionally move it to the bottom of the IP file or delete it |
if [ "x--rotate" == "x${arg1}" ] |
then |
tail -n +2 ${ipfile} > ${tmp} |
echo ${ip} >> ${tmp} |
mv ${tmp} ${ipfile} |
fi |
|
if [ "x--delete" == "x${arg1}" ] |
then |
sed -i ${ipfile} -e "/${arg2}/d" |
fi |
|
# Echo the IP address unless we are deleting |
if [ "x--delete" != "x${arg1}" ] |
then |
echo ${ip} |
fi |
|
) 200> ${lockfile} |
gnu-src/get-ip.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: gnu-src/gcc-4.5.1/gcc/ChangeLog.or32
===================================================================
--- gnu-src/gcc-4.5.1/gcc/ChangeLog.or32 (revision 547)
+++ gnu-src/gcc-4.5.1/gcc/ChangeLog.or32 (revision 548)
@@ -1,3 +1,7 @@
+2011-04-16 Joern Rennecke
+
+ * config/or32/or32.h (OR32_ROUND_ADVANCE_CUM): Don't round.
+
2011-04-13 Joern Rennecke
* config/or32/elf.h (DRIVER_SELF_SPECS): Define.
/gnu-src/gcc-4.5.1/gcc/config/or32/or32.h
706,13 → 706,8
? OR32_ROUND_ADVANCE (int_size_in_bytes (type)) \ |
: OR32_ROUND_ADVANCE (GET_MODE_SIZE (mode))) |
|
/* Round "cum" up to the necessary point for argument "mode"/"type". This is |
either rounded to nearest reg or nearest double-reg boundary */ |
#define OR32_ROUND_ADVANCE_CUM(cum, mode, type) \ |
((((mode) == BLKmode ? TYPE_ALIGN (type) : GET_MODE_BITSIZE (mode)) \ |
> BITS_PER_WORD) \ |
? (((cum) + 1) & ~1) \ |
: (cum)) |
/* The ABI says that no rounding to even or odd words takes place. */ |
#define OR32_ROUND_ADVANCE_CUM(cum, mode, type) (cum) |
|
/* Update the data in "cum" to advance over an argument of mode "mode" and |
data type "type". ("type" is null for libcalls where that information may |
/gnu-src/gdb-7.2/gdb/gdbserver/linux-or32-low.c
50,7 → 50,7
#define GDB_REGNUM_NPC 33 |
#define GDB_REGNUM_SR 34 |
|
/*! This is the number of *GDB* registers. I.e. r0-r31, PPC, NPC and SR. */ |
/*! This is the number of *GDB* registers. I.e. r0-r31, PPC, NPC and SR. */ |
#define or32_num_regs (GDB_REGNUM_SR + 1) |
|
|
/gnu-src/doc/testing.txt
0,0 → 1,127
OpenRISC Test Scripts |
===================== |
|
Rationale |
========= |
|
The standard GNU tool chain regression is quite capable of running on multiple |
remote targets. |
|
However it does not include a facility to restart individual threads of |
testing if a target fails. It is thus unsuitable for remote targets which are |
in some respect unreliable. |
|
The script run-all-tests.sh fixes this. It uses the standard GNU tool chain |
DejaGnu test framework. However it does its own partitioning of threads. As |
each thread completes, it then tests that the remote target is still alive, |
and if not it marks that target as unavailable and repeats the test. |
|
Under simulation it is also appropriate to use finer grain parallelism than is |
available under the standard GNU toolchain test framework. |
|
|
Prerequisites |
============= |
|
The tests require DejaGnu to be installed, and assume that the standard |
OpenRISC build hierarchy (as used by bld-all.sh) is adopted. |
|
|
DejaGnu Test Framework |
====================== |
|
Board specifications are provided in the boards directory. |
|
Testing of the or32-linux tool chain uses multiple remote targets with telnet |
and FTP. The target may be physical hardware or software simulations |
implementing Ethernet and running FTP and telnet daemons. The standard DejaGnu |
scripts are incomplete for telnet and have errors for FTP, so the board |
definition includes missing and fixed expect/TCL code to fix this. |
|
The test script expects the DEJAGNU environment variable to point to the |
main or32 directory (the one containing the boards directory). It uses the |
get-ip.sh script in that directory to obtain the IP address of the next |
available remote target for testing. |
|
The list of target IP addresses is placed in the file ${DEJAGNU}/ip-avail.txt. |
|
|
Linux Configuration |
=================== |
|
The standard Linux configuration for OpenRISC does not start an FTP |
daemon. Modify arch/openrisc/support/initramfs/etc/inetd.conf as follows: |
|
telnet stream tcp nowait root /usr/sbin/telnetd telnetd -i |
ftp stream tcp nowait root ftpd ftpd -w / |
|
The test scripts expect a /tmp directory to be present, so create this as |
arch/openrisc/support/initramfs/tmp. |
|
The test scripts FTP programs into the root directory. However telnet logs in |
as root, with a home directory in /root. Fix this by editing |
arch/openrisc/support/initramfs/etc/passwd to read |
|
root::0:0::/:/bin/sh |
|
Remember to rebuild Linux after these changes. |
|
|
Board Configuration |
=================== |
|
The or32-linux-sim.exp script in the boards directory sets various |
parameters, which may need adjusting. In particular it specifies the absolute |
location of the C and C++ compilers and gives timeouts for command execution |
(1200 seconds) and FTP upload/download (both 120 seconds). |
|
run-all-tests.sh |
================ |
|
Check the function "set_globals" to ensure that the various files and |
directories are correct. |
|
The main function is "run_tool_tests". The first argument is the tool test |
directory, the second the tool source directory, the third the tool name and |
the remaining arguments a list of test thread specifications. |
|
Each test thread specification takes the form: |
|
<thread name>#<runtest target> |
|
A runtest target is typically an expect script, qualified by the names of |
specific source files and/or directories to be tested, for example |
|
executed.exp=execute/2001*%execute/2002* |
|
The default script runs all the tests for gcc, g++ and libstdc++-v3 (using |
three calls to "run-tool_tests". Edit the file to adjust this. |
|
Having set up ip-avail.txt, the script is then run as: |
|
./run-all-tests.sh |
|
|
Supplementary Scripts |
===================== |
|
run-all-tests.sh leaves each tests results in its own log and summary |
files. The script check-results.sh collates all the results. For example |
|
./check-results.sh bd-linux/or32-linux/libstdc++-v3/testsuite/libstdc++/*.log |
|
It is sometimes useful to see how long each test thread took. This may lead to |
adjustment in partitioning of the tests. This can be achieved with the |
check-times.sh script. For example: |
|
./check-times.sh bd-linux/or32-linux/libstdc++-v3/testsuite/libstdc++/*.log |
|
|
Feedback |
======== |
|
Suggestions for improvements always welcome. |
|
|
Jeremy Bennett <jeremy.bennett@embecosm.com> |
3 June 2011 |
gnu-src/doc/testing.txt
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: gnu-src/check-times.sh
===================================================================
--- gnu-src/check-times.sh (nonexistent)
+++ gnu-src/check-times.sh (revision 548)
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Embecosm Limited
+
+# Contributor Jeremy Bennett
+
+# This file is a script to look at log file timings
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3 of the License, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see .
+
+# ------------------------------------------------------------------------------
+
+# Look for the different GNU results in different directories. We put the
+# results to a temporary file, to allow us to suck out the summary as well.
+
+# The argument is the list of log files to process.
+
+# Intermediate result
+tmpf=/tmp/check-timings-$$
+tottime=0
+count=0
+
+# Get each result
+for logfile in $*
+do
+ logfile_base=`basename ${logfile}`
+ logtime=`grep "completed in" ${logfile} | sed -e 's/^.*completed in //' | sed -e 's/ seconds.*$//'`
+ printf "%-25s %5d\n" ${logfile_base} ${logtime} >> ${tmpf}
+
+ if [ "x${logtime}" != "x" ]
+ then
+ tottime=$(( ${tottime} + ${logtime} ))
+ count=$(( ${count} + 1 ))
+ fi
+done
+
+average=$(( ${tottime} / ${count} ))
+sort -n +1 -2 ${tmpf}
+printf "%-25s %5d\n" "Total" ${tottime}
+printf "%-25s %5d\n" "Average" ${average}
+
+rm ${tmpf}
\ No newline at end of file
gnu-src/check-times.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: gnu-src/boards/or32-linux-sim.exp
===================================================================
--- gnu-src/boards/or32-linux-sim.exp (revision 547)
+++ gnu-src/boards/or32-linux-sim.exp (revision 548)
@@ -31,6 +31,8 @@
# -----------------------------------------------------------------------------
proc telnet_close {hostname} {
+ verbose "telnet_close: hostname $hostname" 3
+
# Get the connected host name, if it exists (actually, we think this can
# never be set, but it is for consistency with telnet_open
if {[board_info $hostname exists name]} {
@@ -39,8 +41,12 @@
set connhost $hostname
}
+ if [board_info $connhost exists hostname] {
+ set hostname [board_info $connhost hostname]
+ }
+
# Use the standard close proc from remote.exp
- standard_close $hostname
+ standard_close $connhost
}
@@ -111,8 +117,8 @@
# No response try closing the connection and reopening.
telnet_close $hostname
if {[telnet_open $hostname] != -1} {
- verbose "started new telnet session, spawn_id is [board_info
-$hostname fileid]"
+ verbose "problem: hostname is \"$hostname\""
+ verbose "started new telnet session, spawn_id is [board_info $hostname fileid]"
send -- "\r"
exp_continue
} else {
/gnu-src/find-linuxes.sh
0,0 → 1,48
#!/bin/bash |
|
# Copyright (C) 2011 Embecosm Limited |
|
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
# This file is a script to start up a group of Linux instances |
|
# This program is free software; you can redistribute it and/or modify it |
# under the terms of the GNU General Public License as published by the Free |
# Software Foundation; either version 3 of the License, or (at your option) |
# any later version. |
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
# more details. |
|
# You should have received a copy of the GNU General Public License along |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
|
# ------------------------------------------------------------------------------ |
|
# IP list excluding all known IPs |
ip_list="192.168.0.2-39,41-59,61-79,81-127,129,130,133-255" |
ip_file=`dirname ${DEJAGNU}`/ip-avail.txt |
|
# Keep using nmap until we get the same number of IP addresses twice running. |
nmap -sP -n ${ip_list} | \ |
sed -n -e 's/Nmap scan report for //p' | \ |
sort > ${ip_file} |
len1=`wc -l ${ip_file} | cut -d " " -f 1` |
nmap -sP -n ${ip_list} | \ |
sed -n -e 's/Nmap scan report for //p' | \ |
sort > ${ip_file} |
len2=`wc -l ${ip_file} | cut -d " " -f 1` |
|
while [ ${len1} -ne ${len2} ] |
do |
len1=${len2} |
nmap -sP -n ${ip_list} | \ |
sed -n -e 's/Nmap scan report for //p' | \ |
sort > ${ip_file} |
len2=`wc -l ${ip_file} | cut -d " " -f 1` |
done |
|
# Print the results |
cat ${ip_file} |
gnu-src/find-linuxes.sh
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property