Run Magick on the server but with right path

This commit is contained in:
Nicolas Jeannerod 2024-09-09 14:25:42 +02:00
parent 0c230bd0a7
commit 36ed2c68f4
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8

View file

@ -146,10 +146,7 @@ pkgs.nixosTest {
with subtest("Image displays"): with subtest("Image displays"):
server.succeed(f"su - selenium -c 'selenium-script test@test.com {password}' >&2") server.succeed(f"su - selenium -c 'selenium-script test@test.com {password}' >&2")
server.copy_from_vm("/home/selenium/screenshot.png", "") server.copy_from_vm("/home/selenium/screenshot.png", "")
displayed_colors = subprocess.run( displayed_colors = server.succeed("magick /home/selenium/screenshot.png -define histogram:unique-colors=true -format %c histogram:info:")
["magick", "screenshot.png", "-define", "histogram:unique-colors=true", "-format", "%c", "histogram:info:"],
capture_output=True
)
# check that the green image displayed somewhere # check that the green image displayed somewhere
green_check = re.match(".*#00FF00.*", displayed_colors.stdout.decode(), re.S) green_check = re.match(".*#00FF00.*", displayed_colors.stdout.decode(), re.S)
if green_check is None: if green_check is None: