test-gem5-graphics 619 B

123456789101112
  1. #!/usr/bin/env bash
  2. # Quick and dirty implementation, relies on configs.
  3. # Check that the third image matches a reference penguin SHA.
  4. # https://softwarerecs.stackexchange.com/questions/9774/command-line-tool-to-check-whether-two-images-are-exactly-the-same-graphically/9779#9779
  5. set -eux
  6. rm -rf "$(./getvar "$@" m5out_dir)/frames_system.vncserver"
  7. ./run --eval 'm5 exit' --tmux "$@" -- --frame-capture
  8. gz="$(echo "$(./getvar m5out_dir)/frames_system.vncserver/fb.000002."*.gz)"
  9. png="${gz%.*}"
  10. gunzip --keep "$gz"
  11. [ "$(identify -format '%#' "$png")" = dc41b947487026acdceae8a757259d5a1a4752fd97c1da9ce6df9b49013babed ]