From 744bf61784b5dc44aa1ca370b030c48abc82d54b Mon Sep 17 00:00:00 2001 From: yroux Date: Thu, 4 Dec 2014 11:55:39 +0000 Subject: [PATCH] 2014-12-04 Yvan Roux Backport from trunk r216444. 2014-10-19 Maxim Kuvyrkov * testsuite/lib/libstdc++.exp (v3-copy-file): New proc split from ... (v3-copy-files): ... this. Update. (check_v3_target_fileio): Fix race on cin_unget-1.txt file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@218350 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog.linaro | 9 +++++++++ libstdc++-v3/testsuite/lib/libstdc++.exp | 29 +++++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/ChangeLog.linaro b/libstdc++-v3/ChangeLog.linaro index 26a0a50..63c521d 100644 --- a/libstdc++-v3/ChangeLog.linaro +++ b/libstdc++-v3/ChangeLog.linaro @@ -1,3 +1,12 @@ +2014-12-04 Yvan Roux + + Backport from trunk r216444. + 2014-10-19 Maxim Kuvyrkov + + * testsuite/lib/libstdc++.exp (v3-copy-file): New proc split from ... + (v3-copy-files): ... this. Update. + (check_v3_target_fileio): Fix race on cin_unget-1.txt file. + 2014-11-14 Yvan Roux GCC Linaro 4.9-2014.11 released. diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 95954d8..1fc2bf5 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -63,19 +63,24 @@ proc v3track { var n } { verbose "++ $var is $val" $n } +# Copy file to the target. +proc v3-copy-file {src dst} { + if { [catch { set symlink [file readlink $src] } x] } then { + remote_download target $src $dst + } else { + if { [regexp "^/" "$symlink"] } then { + remote_download target $symlink $dst + } else { + set dirname [file dirname $f] + remote_download target $dirname/$symlink $dst + } + } +} + # Called by v3-init below. "Static" to this file. proc v3-copy-files {srcfiles} { foreach f $srcfiles { - if { [catch { set symlink [file readlink $f] } x] } then { - remote_download target $f - } else { - if { [regexp "^/" "$symlink"] } then { - remote_download target $symlink - } else { - set dirname [file dirname $f] - remote_download target $dirname/$symlink - } - } + v3-copy-file $f [file tail $f] } } @@ -681,8 +686,8 @@ proc check_v3_target_fileio { } { # the file functions set src fileio[pid].cc set exe fileio[pid].x - set testfile "cin_unget-1.txt" - v3-copy-files "$srcdir/data/$testfile" + set testfile "cin_unget-1.[pid].txt" + v3-copy-file "$srcdir/data/cin_unget-1.txt" "$testfile" set f [open $src "w"] puts $f "#include " -- 2.7.4