X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fwidgets%2FMakefile;h=f1d13f22bb05bbd6b15cd09d7b9a78af3f23fc18;hb=fbe86a69010121ad4ba7a65fc99918c341dde490;hp=94ff1585405cdb9d3b29a1bfdd94a56bed22b925;hpb=8aead6499fa38935ea592a03900ccc60701d3ff7;p=mkws-moved-to-github.git diff --git a/test/widgets/Makefile b/test/widgets/Makefile index 94ff158..f1d13f2 100644 --- a/test/widgets/Makefile +++ b/test/widgets/Makefile @@ -1,7 +1,7 @@ # Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com -PHANTOMJS_TIMEOUT=18 -PHANTOMJS= ../node_modules/phantomjs/bin/phantomjs +PHANTOMJS_TIMEOUT=30 +PHANTOMJS= perl ../bin/bomb.pl --timeout=${PHANTOMJS_TIMEOUT} ../node_modules/phantomjs/bin/phantomjs IMAGES= ./images SCREENSHOT_WIDTH_HEIGHT= 1000 1200 PERL_SCRIPTS= ../bin/bomb.pl @@ -18,6 +18,7 @@ all: help clean: rm -f index-*.html + rm -f iframe-*.html rm -f ${IMAGES}/*.png distclean: clean @@ -27,10 +28,11 @@ test: check screenshot: file=${PREFIX}.$$(echo "${PHANTOMJS_URL}" | perl -npe 's,(\W),-,g; s/-$$//;'); \ - ${PHANTOMJS} ${PROG} ${PHANTOMJS_URL} ${IMAGES}/tmp.$$file.png ${SCREENSHOT_WIDTH_HEIGHT} ${TIMEOUT}; \ + ${PHANTOMJS} ${PROG} "${PHANTOMJS_URL}" ${IMAGES}/tmp.$$file.png ${SCREENSHOT_WIDTH_HEIGHT} ${TIMEOUT}; \ mv -f ${IMAGES}/tmp.$$file.png ${IMAGES}/$$file.png -screenshots: clean estimate-time +screenshots: clean estimate-time iframe + set -e; \ for t in ${TESTS}; do \ for i in $$(cat url.$$t); do \ ${MAKE} PHANTOMJS_URL="$$i" TIMEOUT=4 PREFIX=$$t screenshot; \ @@ -45,10 +47,14 @@ estimate-time: index: ( cd ${IMAGES}; ls -tr ${PREFIX}.*.png | perl -ne 'chomp; print qq{

$$_



\n}' ) > index-${PREFIX}.html +iframe: index-iframe-demo +index-iframe-demo: + ( cat url.demos | perl -ne 'chomp; print qq{

$$_

\n}' ) > iframe-demos.html + help: @echo "make [ all | clean | distclean ]" @echo " [ screenshots ]" - @echo " [ screenshot | index ]" + @echo " [ screenshot | index | iframe ]" @echo "" @echo "Examples: " @echo ""