Skip to content

Commit

Permalink
Fix update-references for tests within subdirectories.
Browse files Browse the repository at this point in the history
Fixes rust-lang#50438.

I'll make this more robust later for rust-lang#49815.
  • Loading branch information
ehuss committed May 4, 2018
1 parent 22a41e4 commit ab3b816
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/ui/update-references.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab3b816

Please sign in to comment.