Skip to content

Commit ab3b816

Browse files
committed
Fix update-references for tests within subdirectories.
Fixes #50438. I'll make this more robust later for #49815.
1 parent 22a41e4 commit ab3b816

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)