Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/mkws
authorWolfram Schneider <wosch@indexdata.dk>
Wed, 15 Oct 2014 11:41:01 +0000 (13:41 +0200)
committerWolfram Schneider <wosch@indexdata.dk>
Wed, 15 Oct 2014 11:41:01 +0000 (13:41 +0200)
test/.gitignore
test/Makefile
test/bin/apache-template-update
tools/apache2/jasmine-dev.template
tools/apache2/jasmine-dev.template-2.4

index dc05163..6b57950 100644 (file)
@@ -1,8 +1,5 @@
 libexec
-logs/error_log
-logs/jasmine-dev
-logs/mkws-jasmine-access.log
-logs/mkws-jasmine-error.log
-logs/mkws-jasmine-rewrite.log
-logs/mkws-jasmine.pid
+logs/error-*\.log
+logs/jasmine-dev-*\.conf
+logs/mkws-jasmine-*\.log
 node_modules
index d4597df..86fca10 100644 (file)
@@ -18,6 +18,7 @@ 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
 
@@ -27,7 +28,7 @@ clean:
 
 distclean: clean clean-tmp clean-error
        rm -rf node_modules
-       rm -f ${TMP_DIR}/jasmine-dev
+       rm -f ${TMP_DIR}/jasmine-dev*.conf
        rm -f libexec
        make -C./widgets $@
 
@@ -99,16 +100,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 ]"
index 29024ab..db0c6e5 100755 (executable)
@@ -9,11 +9,12 @@ export APACHE_SERVER_ROOT=$(pwd)
 export APACHE_RUN_USER=$(whoami)
 export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
 
-export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
-export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine.pid
-export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept.lock
 : ${APACHE_PORT=4040}; export APACHE_PORT
 
+export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
+export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine-${APACHE_PORT}.pid
+export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept-${APACHE_PORT}.lock
+
 export MKWS_ROOT=$(pwd)/..
 
 MKWS_OS=debian
@@ -47,7 +48,7 @@ else
     APACHE_MODULES="$MKWS_ROOT/tools/apache2/jasmine-dev.apache-modules.$MKWS_OS.conf"
 fi
 
-: ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev"}
+: ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev-${APACHE_PORT}.conf"}
 export APACHE_MODULES
 
 perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp
index 92e22cb..6ec427f 100644 (file)
@@ -7,6 +7,7 @@ User ${APACHE_RUN_USER}
 Group ${APACHE_RUN_GROUP}
 PidFile ${APACHE_PID_FILE}
 LockFile ${APACHE_LOCK_FILE}
+ErrorLog ${APACHE_LOG_DIR}/error-${APACHE_PORT}.log
 
 ServerName localhost
 ServerRoot ${APACHE_SERVER_ROOT}
@@ -27,12 +28,12 @@ Include ${APACHE_MODULES}
     ServerAlias mkws-dev a.mkws.indexdata.com a.mkws-dev.indexdata.com mkws-dev.indexdata.com 127.0.0.1
 
     ServerAdmin webmaster@indexdata.com
-    ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error.log
-    CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access.log combined
+    ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error-${APACHE_PORT}.log
+    CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access-${APACHE_PORT}.log combined
 
     RewriteEngine on
     RewriteLogLevel 1
-    RewriteLog ${APACHE_LOG_DIR}/mkws-jasmine-rewrite.log 
+    RewriteLog ${APACHE_LOG_DIR}/mkws-jasmine-rewrite-${APACHE_PORT}.log 
 
     DocumentRoot ${MKWS_ROOT}/examples/htdocs
     Alias /tools/htdocs ${MKWS_ROOT}/tools/htdocs
index 3c0f626..30a87b8 100644 (file)
@@ -7,6 +7,7 @@ User ${APACHE_RUN_USER}
 Group ${APACHE_RUN_GROUP}
 PidFile ${APACHE_PID_FILE}
 Mutex file:${APACHE_LOG_DIR}
+ErrorLog ${APACHE_LOG_DIR}/error-${APACHE_PORT}.log
 
 ServerName localhost
 ServerRoot ${APACHE_SERVER_ROOT}
@@ -24,8 +25,8 @@ Include ${APACHE_MODULES}
     ServerAlias mkws-dev a.mkws.indexdata.com a.mkws-dev.indexdata.com mkws-dev.indexdata.com 127.0.0.1
 
     ServerAdmin webmaster@indexdata.com
-    ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error.log
-    CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access.log combined
+    ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error-${APACHE_PORT}.log
+    CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access-${APACHE_PORT}.log combined
     LogLevel info rewrite:debug
 
     RewriteEngine on