diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-05-10 11:35:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-10 11:35:19 -0500 |
| commit | 7bd4fdadfe4da50648f1cad8404ea065179a02a1 (patch) | |
| tree | 162329e5108629709481df88a01d01113e9aad8e | |
| parent | cff1a263c9e7744df286d2518e0c6ca3191dc681 (diff) | |
| parent | 5128affbc482e65cc678745cd529e7e055b9cf8b (diff) | |
| download | rust-7bd4fdadfe4da50648f1cad8404ea065179a02a1.tar.gz rust-7bd4fdadfe4da50648f1cad8404ea065179a02a1.zip | |
Rollup merge of #50447 - ehuss:fix-update-references, r=alexcrichton
Fix update-references for tests within subdirectories. Fixes #50438. I'll make this more robust later for #49815.
| -rwxr-xr-x | src/test/ui/update-references.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/ui/update-references.sh b/src/test/ui/update-references.sh index 47a85352b00..00b4b5c5caa 100755 --- a/src/test/ui/update-references.sh +++ b/src/test/ui/update-references.sh @@ -26,6 +26,7 @@ if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" || "$2" == "" ]]; then echo " $0 ../../../build/x86_64-apple-darwin/test/ui *.rs */*.rs" fi +MYDIR=$(dirname $0) BUILD_DIR="$1" shift @@ -33,13 +34,13 @@ shift shopt -s nullglob while [[ "$1" != "" ]]; do - MYDIR=$(dirname $1) for EXT in "stderr" "stdout" "fixed"; 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 |
