Skip to content

Commit f47ec3c

Browse files
authored
Rollup merge of rust-lang#50447 - ehuss:fix-update-references, r=alexcrichton
Fix update-references for tests within subdirectories. Fixes rust-lang#50438. I'll make this more robust later for rust-lang#49815.
2 parents c5b5802 + ab3b816 commit f47ec3c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/ui/update-references.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ shopt -s nullglob
3636
while [[ "$1" != "" ]]; do
3737
for EXT in "stderr" "stdout"; do
3838
for OUT_NAME in $BUILD_DIR/${1%.rs}.*$EXT; do
39+
OUT_DIR=`dirname "$1"`
3940
OUT_BASE=`basename "$OUT_NAME"`
40-
if ! (diff $OUT_NAME $MYDIR/$OUT_BASE >& /dev/null); then
41-
echo updating $MYDIR/$OUT_BASE
42-
cp $OUT_NAME $MYDIR
41+
if ! (diff $OUT_NAME $MYDIR/$OUT_DIR/$OUT_BASE >& /dev/null); then
42+
echo updating $MYDIR/$OUT_DIR/$OUT_BASE
43+
cp $OUT_NAME $MYDIR/$OUT_DIR
4344
fi
4445
done
4546
done

0 commit comments

Comments
 (0)