1e4d41d60c2deb6aa54e3f9238a9e0b7b29180f0
[mkws-moved-to-github.git] / test / widgets / Makefile
1 # Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com
2
3 PHANTOMJS_TIMEOUT=18
4 PHANTOMJS=      ../node_modules/phantomjs/bin/phantomjs
5 IMAGES=         ./images
6 SCREENSHOT_WIDTH_HEIGHT=        1200 1000
7 PERL_SCRIPTS=   ../bin/bomb.pl
8 PROG=   ../phantom/screenshot.js
9 MD5=    $(shell which md5 md5sum)
10 TIMEOUT=5
11
12 PHANTOMJS_URL=  http://cph.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi
13 PHANTOMJS_URL=  http://www.indexdata.com/
14
15 all: check
16
17 clean:
18         rm -f mkws-error.png mkws-error.html 
19         rm -f images/*.png
20
21 distclean: clean
22
23 test: check
24
25 screenshot:
26         file=$$(echo "${PHANTOMJS_URL}" | ${MD5} | perl -npe 's,\s.*,,'); \
27         ${PHANTOMJS} ${PROG} ${PHANTOMJS_URL} ${IMAGES}/$$file.png ${SCREENSHOT_WIDTH_HEIGHT} ${TIMEOUT}
28
29 help:
30         @echo "make [ all | clean | distclean ]"
31         @echo "     [ screenshots ]"
32         @echo ""
33