X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2FMakefile;h=c0333fa988f3a267c33861d2812341e4a68d7381;hb=b5cee14f163b48d8da1bded7120dee1eb6323b72;hp=d4597df4f216f59d1a5e543061f8041ec7598b34;hpb=46011122542be3802f8c78f76c113059b9bc26da;p=mkws-moved-to-github.git diff --git a/test/Makefile b/test/Makefile index d4597df..c0333fa 100644 --- a/test/Makefile +++ b/test/Makefile @@ -18,18 +18,18 @@ SCREENSHOT_WIDTH= 360 480 640 768 1024 1200 1440 2048 PERL_SCRIPTS= bin/bomb.pl TMP_DIR= ./logs APACHE_HTTPD:= $(shell env PATH=$$PATH:/usr/sbin which apache2 httpd false | head -1 ) +APACHE_PORT ?= 4040 all: check clean: rm -f mkws-error.png mkws-error.html rm -f images/*.png + ${MAKE} -C./widgets $@ distclean: clean clean-tmp clean-error rm -rf node_modules - rm -f ${TMP_DIR}/jasmine-dev rm -f libexec - make -C./widgets $@ clean-error: rm -f mkws-error.png.* mkws-error.html.* @@ -40,9 +40,9 @@ clean-tmp: touch ${TMP_DIR}/.gitkeep mkws-complete-syntax-check: - ${MAKE} -C../tools/htdocs mkws-complete.min.js + ${MAKE} -C../src ../tools/htdocs/mkws-complete.min.js -check: mkws-complete-syntax-check +check check-js: mkws-complete-syntax-check @if [ ! -e node_modules ]; then echo "please run first: make node-modules"; exit 1; fi ${JASMINE_NODE} --noColor --captureExceptions --forceexit ./spec @@ -82,7 +82,7 @@ screenshot-indexdata: ls -l ${IMAGES} screenshots: - make -C ./widgets $@ + ${MAKE} -C ./widgets $@ jsbeautifier jsb indent: for i in package.json ./spec*/*.js ./js/*.js ./phantom/*.js; do \ @@ -99,16 +99,17 @@ node_modules node-modules: apache-start: bin/apache-template-update - ${APACHE_HTTPD} -f `pwd`/${TMP_DIR}/jasmine-dev + ${APACHE_HTTPD} -f `pwd`/${TMP_DIR}/jasmine-dev-${APACHE_PORT}.conf +APACHE_PID_FILE=${TMP_DIR}/mkws-jasmine-${APACHE_PORT}.pid apache-stop: - @-if [ -e ${TMP_DIR}/mkws-jasmine.pid ]; then \ - kill `cat ${TMP_DIR}/mkws-jasmine.pid`; \ + @-if [ -e ${APACHE_PID_FILE} ]; then \ + kill `cat ${APACHE_PID_FILE}`; \ else \ killall apache2 2> /dev/null; \ fi @sleep 0.6 - rm -f ${TMP_DIR}/mkws-jasmine.pid + rm -f ${APACHE_PID_FILE} help: @echo "make [ all | check | clean | distclean ]" @@ -124,6 +125,7 @@ help: @echo "DEBUG=0 APACHE_PORT=5050 make -s phantomjs PHANTOMJS_TIMEOUT=12 PHANTOMJS_PATH=${PHANTOMJS_PATH}" @echo "DEBUG=2 make phantomjs PHANTOMJS_TIMEOUT=12 PHANTOMJS_URL=${PHANTOMJS_URL}" @echo "" + @echo "make APACHE_PORT=5050 apache-start" @echo "make phantomjs-all" @echo ""