about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2018-05-04 14:31:43 -0700
committerEric Huss <eric@huss.org>2018-05-16 22:25:20 -0700
commit6f414b1408c004e32387d7fb563a9cc5cab28526 (patch)
tree54d74b8515762b7efac12200d53dacdf7e0d2692 /src
parente3d8fc50444a268a572117669e0fb3f9eabd1c29 (diff)
downloadrust-6f414b1408c004e32387d7fb563a9cc5cab28526.tar.gz
rust-6f414b1408c004e32387d7fb563a9cc5cab28526.zip
Fix update-references for tests within subdirectories.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/test/ui-fulldeps/update-references.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/ui-fulldeps/update-references.sh b/src/test/ui-fulldeps/update-references.sh
index 86f555620ee..48e7ec8c25a 100755
--- a/src/test/ui-fulldeps/update-references.sh
+++ b/src/test/ui-fulldeps/update-references.sh
@@ -36,10 +36,11 @@ shopt -s nullglob
 while [[ "$1" != "" ]]; do
     for EXT in "stderr" "stdout"; do
         for OUT_NAME in $BUILD_DIR/${1%.rs}*/*$EXT; do
+            OUT_DIR=`dirname "$1"`
             OUT_BASE=`basename "$OUT_NAME"`
-            if ! (diff $OUT_NAME $MYDIR/$OUT_BASE >& /dev/null); then
-                echo updating $MYDIR/$OUT_BASE
-                cp $OUT_NAME $MYDIR
+            if ! (diff $OUT_NAME $MYDIR/$OUT_DIR/$OUT_BASE >& /dev/null); then
+                echo updating $MYDIR/$OUT_DIR/$OUT_BASE
+                cp $OUT_NAME $MYDIR/$OUT_DIR
             fi
         done
     done