File: test-tiles

package info (click to toggle)
cataclysm-dda 0.H-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 710,808 kB
  • sloc: cpp: 524,019; python: 11,580; sh: 1,228; makefile: 1,169; xml: 507; javascript: 150; sql: 56; exp: 41; perl: 37
file content (36 lines) | stat: -rwxr-xr-x 708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

set -ex

cd "$AUTOPKGTEST_ARTIFACTS"

# need to create directories until upstream bug #26660 is fixed
mkdir -p ~/.config
mkdir -p ~/.local/share

export LANG=en_US.UTF-8

# cdda needs audio or it won't start (#59464)
export SDL_AUDIODRIVER=dummy

# start cdda and a window manager, and wait a bit
openbox &
PID_OPENBOX=$!
sleep 5
/usr/games/cataclysm-tiles &
PID_CDDA=$!
sleep 15
xdotool search --onlyvisible --class cataclysm-tiles windowfocus

# take screenshot and OCR it
scrot screen.png
scrot --focused cdda.png
kill "$PID_CDDA"
kill "$PID_OPENBOX"
tesseract cdda.png cdda

sed -e 's/^/# cdda.txt: /' < cdda.txt

grep -i "New Game" cdda.txt
grep -i "Help" cdda.txt
grep -i "Credits" cdda.txt