run screen shots in parallel (3 times faster)
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 8 Jan 2015 14:19:55 +0000 (14:19 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 8 Jan 2015 14:19:55 +0000 (14:19 +0000)
test/widgets/Makefile

index 45e8951..b59bf67 100644 (file)
@@ -35,8 +35,8 @@ 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; \
-           done; \
+               ${MAKE} PHANTOMJS_URL="$$i" TIMEOUT=4 PREFIX=$$t screenshot & sleep 1; \
+           done; wait; \
            ${MAKE} PREFIX=$$t index; \
        done
        ${MAKE} tidy help-url
@@ -46,7 +46,7 @@ help-url:
        @echo "Please check now: http://localhost/test/widgets/"
 
 estimate-time:
-       @wc -l url.* | tail -n1 | awk '{print "Estimeate run time: " $$1 * (1 + '${TIMEOUT}'), "seconds" }'
+       @wc -l url.* | tail -n1 | awk '{print "Estimeate run time: " $$1 * (1 + '${TIMEOUT}') * 0.5, "seconds" }'
        @echo ""
 
 index: