parent
40ac300cbc
commit
5685a9eca1
9
debian/tests/compare
vendored
9
debian/tests/compare
vendored
@ -12,6 +12,13 @@ sudo systemctl start xrdp
|
||||
# login screen.
|
||||
xvfb-run -l "$testdir/connect-and-capture" "$screenshot"
|
||||
|
||||
# Try to remove the background to leave just the login window in the image
|
||||
cp -a "$screenshot" "${screenshot}.before.mogrify.png"
|
||||
mogrify -fuzz 4% -define trim:percent-background=0% -trim +repage -format png "$screenshot"
|
||||
|
||||
# Resize the search image to match nearly the really displayed size
|
||||
convert -resize 50% /usr/share/xrdp/xrdp_logo.bmp xrdp_logo_50percent.png
|
||||
|
||||
# Confirm that the XRDP logo is in the log in screen (so as to confirm that the
|
||||
# login screen is really there).
|
||||
# https://stackoverflow.com/questions/31867093/how-to-search-an-image-for-subimages-using-linux-console
|
||||
@ -21,7 +28,7 @@ xvfb-run -l "$testdir/connect-and-capture" "$screenshot"
|
||||
# will fail but we don't need to check that specifically, because so
|
||||
# will the if below.
|
||||
compare -metric RMSE -subimage-search \
|
||||
"$screenshot" /usr/share/xrdp/xrdp_logo.bmp png:"$magickout"
|
||||
"$screenshot" xrdp_logo_50percent.png png:"$magickout"
|
||||
# In case of match, output will be like
|
||||
# "520,347: (255,255,255) #FFFFFF gray(255)"
|
||||
# in which the first field is the coordinates of the match.
|
||||
|
||||
2
debian/tests/connect-and-capture
vendored
Normal file → Executable file
2
debian/tests/connect-and-capture
vendored
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
xfreerdp /f /v:localhost:3389 /p: /u: /d: &
|
||||
xfreerdp /f /v:localhost:3389 /p: /u: /d: /cert-tofu &
|
||||
sleep 12
|
||||
import -window root "$1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user