mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-13 14:10:21 +08:00
Respect TMPDIR in contrib scripts.
2018-02-18 Yury Gribov <tetra2005@gmail.com> contrib/ * compare_tests: Use TMPDIR when set. * dg-cmp-results.sh: Ditto. * warn_summary: Ditto. From-SVN: r257801
This commit is contained in:
parent
e2b7efbf27
commit
9f88a07b85
@ -1,3 +1,9 @@
|
|||||||
|
2018-02-19 Yury Gribov <tetra2005@gmail.com>
|
||||||
|
|
||||||
|
* compare_tests: Use TMPDIR when set.
|
||||||
|
* dg-cmp-results.sh: Ditto.
|
||||||
|
* warn_summary: Ditto.
|
||||||
|
|
||||||
2018-01-29 Jonathan Wakely <jwakely@redhat.com>
|
2018-01-29 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
* download_prerequisites: Use shasum for FreeBSD and DragonFly.
|
* download_prerequisites: Use shasum for FreeBSD and DragonFly.
|
||||||
|
@ -36,17 +36,18 @@ export LC_ALL=C
|
|||||||
|
|
||||||
tool=gxx
|
tool=gxx
|
||||||
|
|
||||||
tmp1=/tmp/$tool-testing.$$a
|
TMPDIR=${TMPDIR:-/tmp}
|
||||||
tmp2=/tmp/$tool-testing.$$b
|
tmp1=$TMPDIR/$tool-testing.$$a
|
||||||
now_s=/tmp/$tool-testing.$$d
|
tmp2=$TMPDIR/$tool-testing.$$b
|
||||||
before_s=/tmp/$tool-testing.$$e
|
now_s=$TMPDIR/$tool-testing.$$d
|
||||||
lst1=/tmp/$tool-lst1.$$
|
before_s=$TMPDIR/$tool-testing.$$e
|
||||||
lst2=/tmp/$tool-lst2.$$
|
lst1=$TMPDIR/$tool-lst1.$$
|
||||||
lst3=/tmp/$tool-lst3.$$
|
lst2=$TMPDIR/$tool-lst2.$$
|
||||||
lst4=/tmp/$tool-lst4.$$
|
lst3=$TMPDIR/$tool-lst3.$$
|
||||||
lst5=/tmp/$tool-lst5.$$
|
lst4=$TMPDIR/$tool-lst4.$$
|
||||||
sum1=/tmp/$tool-sum1.$$
|
lst5=$TMPDIR/$tool-lst5.$$
|
||||||
sum2=/tmp/$tool-sum2.$$
|
sum1=$TMPDIR/$tool-sum1.$$
|
||||||
|
sum2=$TMPDIR/$tool-sum2.$$
|
||||||
tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $sum2"
|
tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $sum2"
|
||||||
|
|
||||||
[ "$1" = "-strict" ] && strict=$1 && shift
|
[ "$1" = "-strict" ] && strict=$1 && shift
|
||||||
|
@ -63,6 +63,7 @@ OFILE="$2"
|
|||||||
OBASE=`basename "$2"`
|
OBASE=`basename "$2"`
|
||||||
NFILE="$3"
|
NFILE="$3"
|
||||||
NBASE=`basename "$3"`
|
NBASE=`basename "$3"`
|
||||||
|
TMPDIR=${TMPDIR:-/tmp}
|
||||||
|
|
||||||
echo "dg-cmp-results.sh: Verbosity is ${verbose}, Variant is \"${VARIANT}\""
|
echo "dg-cmp-results.sh: Verbosity is ${verbose}, Variant is \"${VARIANT}\""
|
||||||
echo
|
echo
|
||||||
@ -97,7 +98,7 @@ sed $E -e "/$header/,/^[[:space:]]+===.*Summary ===/!d" \
|
|||||||
-e 's/^/O:/' \
|
-e 's/^/O:/' \
|
||||||
$OFILE |
|
$OFILE |
|
||||||
sort -s -t : -k 3b - \
|
sort -s -t : -k 3b - \
|
||||||
>/tmp/o$$-$OBASE
|
>$TMPDIR/o$$-$OBASE
|
||||||
|
|
||||||
# Create a temporary file from the new file's interesting section.
|
# Create a temporary file from the new file's interesting section.
|
||||||
sed $E -e "/$header/,/^[[:space:]]+===.*Summary ===/!d" \
|
sed $E -e "/$header/,/^[[:space:]]+===.*Summary ===/!d" \
|
||||||
@ -107,7 +108,7 @@ sed $E -e "/$header/,/^[[:space:]]+===.*Summary ===/!d" \
|
|||||||
-e 's/^/N:/' \
|
-e 's/^/N:/' \
|
||||||
$NFILE |
|
$NFILE |
|
||||||
sort -s -t : -k 3b - \
|
sort -s -t : -k 3b - \
|
||||||
>/tmp/n$$-$NBASE
|
>$TMPDIR/n$$-$NBASE
|
||||||
|
|
||||||
# Merge the two files, then compare adjacent lines.
|
# Merge the two files, then compare adjacent lines.
|
||||||
# Comparison is complicated by tests that may be run multiple times.
|
# Comparison is complicated by tests that may be run multiple times.
|
||||||
@ -200,10 +201,10 @@ END {
|
|||||||
while (old = peek()) compare("", "")
|
while (old = peek()) compare("", "")
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
sort -m -s -t : -k 3b /tmp/o$$-$OBASE /tmp/n$$-$NBASE |
|
sort -m -s -t : -k 3b $TMPDIR/o$$-$OBASE $TMPDIR/n$$-$NBASE |
|
||||||
awk -v verbose=$verbose -f compare-$$.awk /dev/stdin
|
awk -v verbose=$verbose -f compare-$$.awk /dev/stdin
|
||||||
|
|
||||||
# Delete the temporary files.
|
# Delete the temporary files.
|
||||||
rm -f compare-$$.awk /tmp/o$$-$OBASE /tmp/n$$-$NBASE
|
rm -f compare-$$.awk $TMPDIR/o$$-$OBASE $TMPDIR/n$$-$NBASE
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -138,7 +138,7 @@ s%^[^ ]*/\(lib[a-z23+-]*/\)%\1%;'
|
|||||||
|
|
||||||
usage="usage: `basename $0` [-llf] [-s stage] [-nosub|-ch|-cp|-f|-fortran|-ada|-intl|-fixinc] [-pass|-wpass] [file(s)]"
|
usage="usage: `basename $0` [-llf] [-s stage] [-nosub|-ch|-cp|-f|-fortran|-ada|-intl|-fixinc] [-pass|-wpass] [file(s)]"
|
||||||
stageN=3
|
stageN=3
|
||||||
tmpfile=/tmp/tmp-warn.$$
|
tmpfile=${TMPDIR:-/tmp}/tmp-warn.$$
|
||||||
|
|
||||||
# Remove $tmpfile on exit and various signals.
|
# Remove $tmpfile on exit and various signals.
|
||||||
trap "rm -f $tmpfile" 0
|
trap "rm -f $tmpfile" 0
|
||||||
|
Loading…
Reference in New Issue
Block a user