diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/go.test/test/run-arm | |
download | cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2 cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/go.test/test/run-arm')
-rwxr-xr-x | gcc/testsuite/go.test/test/run-arm | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/gcc/testsuite/go.test/test/run-arm b/gcc/testsuite/go.test/test/run-arm new file mode 100755 index 000000000..a62df10ca --- /dev/null +++ b/gcc/testsuite/go.test/test/run-arm @@ -0,0 +1,102 @@ +#!/bin/sh +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +export E="" +case X"$GOARCH" in +Xamd64) + export A=6 + ;; +X386) + export A=8 + ;; +Xarm) + export A=5 + export E="${GORUN:-qemu-arm -cpu cortex-a8}" + ;; +*) + echo 1>&2 run: unsupported '$GOARCH' + exit 1 +esac + +export G=${A}g +export L=${A}l +export GOTRACEBACK=0 + +PATH=/bin:/usr/bin:/usr/local/bin:${GOBIN:-$GOROOT/bin}:`pwd` + +RUNFILE=/tmp/gorun-$$-$USER +TMP1FILE=/tmp/gotest1-$$-$USER +TMP2FILE=/tmp/gotest2-$$-$USER +FAILEDFILE=/tmp/gotest3-$$-$USER + +# don't run the machine out of memory: limit individual processes to 4GB. +# on thresher, 3GB suffices to run the tests; with 2GB, peano fails. +ulimit -v 4000000 + +# no core files please +ulimit -c 0 + +true >times.out + +# TODO(kaib): figure out why the GC makes things so utterly slow. +export GOGC=off +export GOTRACEBACK=0 + +for i in $(cat arm-pass.txt | sed 's/#.*//') +do + export F=$(basename $i .go) + dir=$(dirname $i) + export D=$dir + sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|' >$RUNFILE + if ! { time -p bash -c "bash $RUNFILE >$TMP1FILE 2>&1" ; } 2>$TMP2FILE + then + echo + echo "===========" $i + cat $TMP1FILE + echo >&2 fail: $i + touch $FAILEDFILE + elif test -s $TMP1FILE + then + echo + echo "===========" $i + cat $TMP1FILE + elif [ $dir = "bugs" ] + then + echo $i succeeded with no output. + fi + echo $(awk 'NR==1{print $2}' $TMP2FILE) $D/$F >>times.out +done | # clean up some stack noise + egrep -v '^(r[0-9a-z]+|[cfg]s) +0x' | + sed '/tmp.*Bus error/s/.*Bus/Bus/; /tmp.*Trace.BPT/s/.*Trace/Trace/ + s!'$RUNFILE'!$RUNFILE!g + s/ PC=0x[0-9a-f]*/ PC=xxx/ + s/^pc: 0x[0-9a-f]*/pc: xxx/ + /^Trace\/breakpoint trap/d + /^Trace\/BPT trap/d + s!'$GOROOT'!$GOROOT!g + /Segmentation fault/d + /RUNFILE/ s/line 1: *[0-9]*/line 1: PID/ + /^\$RUNFILE: line 1: PID Trace\/breakpoint trap/d + /^qemu: uncaught target signal 11 (Segmentation fault) - exiting/d' > run.out + +failed=0 +rm -f $RUNFILE $TMP1FILE $TMP2FILE *.$A $A.out +diffmsg="" +if ! diff -b golden-arm.out run.out +then + diffmsg="; test output differs" + failed=1 +fi + +notinbugs=$(sed '/== bugs/q' run.out | grep -c '^BUG') +inbugs=$(sed '1,/== bugs/d' run.out | grep -c '^BUG') + +echo 2>&1 $inbugs known bugs';' $notinbugs unexpected bugs$diffmsg + +if [ "$failed" != "0" ]; then + echo FAILED +fi + +exit $failed |