Skip to content

Commit 799d64a

Browse files
committed
delete diff images that perfectly match
1 parent ba050a0 commit 799d64a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.circleci/orca-build-verify.sh

+10
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ function compare()
8484
}
8585
compare $NODE_QUEUE
8686

87+
function delete_perfect_matches()
88+
{
89+
grep -l -R "all: 0" $DIFF_IMAGES/ | gawk '{match($0, /diff\/([^.]*)/, arr); print arr[1]}' > /tmp/succeeded
90+
cat /tmp/succeeded | \
91+
xargs -n1 -I {} rm $DIFF_IMAGES/{}.png $DIFF_IMAGES/{}.txt
92+
}
93+
delete_perfect_matches
94+
8795
CODE=$(grep -R "all: [^0]" $DIFF_IMAGES/ | wc -l)
8896

8997
# If there are different images, retry
@@ -93,7 +101,9 @@ if [ "$CODE" -ne "0" ]; then
93101
cat /tmp/failed
94102
generate /tmp/failed
95103
compare /tmp/failed
104+
delete_perfect_matches
96105
CODE=$(grep -R "all: [^0]" $DIFF_IMAGES/ | wc -l)
97106
fi
107+
98108
echo "$CODE different images"
99109
exit $CODE

0 commit comments

Comments
 (0)