Skip to content

skip some skippable tests #3102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions test/test_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,6 @@

. ./variables.sh

# is a difference beyond a threshold? return 0 (meaning all ok) or 1 (meaning
# error, or outside threshold)
#
# use bc since bash does not support fp math
break_threshold() {
diff=$1
threshold=$2
return $(echo "$diff <= $threshold" | bc -l)
}

# subtract, look for max difference less than a threshold
test_difference() {
before=$1
after=$2
threshold=$3

$vips subtract $before $after $tmp/difference.v
$vips abs $tmp/difference.v $tmp/abs.v
dif=$($vips max $tmp/abs.v)

if break_threshold $dif $threshold; then
echo "difference is $dif"
exit 1
fi
}

test_rotate() {
im=$1
inter=$2
Expand Down
2 changes: 2 additions & 0 deletions test/test_connections.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ if test_supported jpegload_source; then

# test max difference < 10
test_difference $image $tmp/x.png 10
else
exit 77
fi
2 changes: 2 additions & 0 deletions test/test_stall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ if test_supported tiffload; then
-1 -1 -1
EOF
VIPS_STALL=1 $vips conv $tmp/x.tif $tmp/x2.tif $tmp/mask.con
else
exit 77
fi
5 changes: 5 additions & 0 deletions test/variables.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ test_supported() {

# is a difference beyond a threshold? return 0 (meaning all ok) or 1 (meaning
# error, or outside threshold)
#
# use bc since bash does not support fp math
break_threshold() {
diff=$1
threshold=$2
if ! command -v bc >/dev/null; then
exit 77
fi
return $(echo "$diff <= $threshold" | bc -l)
}

Expand Down