2020 global :
2121 - DEPENDENCIES=standard
2222 - APC=true
23- - TRAVIS_TEST_EXCLUDES="--exclude-group slow,jpgraph"
23+ - TRAVIS_TEST_EXCLUDES="--exclude-group slow,jpgraph,pushserver "
2424 matrix :
2525 - DB=mysql
2626 - DB=pgsql
@@ -30,7 +30,10 @@ matrix:
3030 include :
3131 # httpd-based
3232 - php : 5.4
33- env : DB=mysql TEST_ADAPTER=HTTP
33+ env : DB=mysql TEST_COMPONENT=HTTPD
34+ # push-server
35+ - php : 5.4
36+ env : DB=mysql TEST_COMPONENT=PUSH_SERVER
3437 # from..to
3538 - php : 5.4
3639 env : DB=mysql DEPENDENCIES=lowest
@@ -76,7 +79,7 @@ install:
7679 - if [ "$DEPENDENCIES" = "highest" ]; then composer update -n; fi
7780 - if [ "$JSLINT" = true ]; then npm install; fi
7881 - if [ "$SECURITY" = true ]; then wget http://get.sensiolabs.org/security-checker.phar; fi
79- - if [ "$TEST_ADAPTER " = "HTTP " ]; then composer require volkszaehler/httpd:dev-master jenssegers/proxy:~2.2; fi
82+ - if [ "$TEST_COMPONENT " = "HTTPD " ]; then composer require volkszaehler/httpd:dev-master jenssegers/proxy:~2.2; fi
8083
8184 # add apc cache
8285 - |
@@ -100,7 +103,7 @@ before_script:
100103 - sed -i "s/'vz'/'$USER'/" etc/volkszaehler.conf.php
101104 - sed -i "s/'demo'/'$PASSWORD'/" etc/volkszaehler.conf.php
102105 - sed -i "s/'volkszaehler'/'$DATABASE'/" etc/volkszaehler.conf.php
103- - if [ "$DB" = "sqlite" ]; then sed -i "s/\?>/\$config['db']['path']\ =\ VZ_DIR.'\/sqlite.db3'\n?>/" etc/volkszaehler.conf.php; fi
106+ - if [ "$DB" = "sqlite" ]; then sed -i "s/\?>/\$config['db']['path']\ =\ VZ_DIR.'\/sqlite.db3'\;\ n?>/" etc/volkszaehler.conf.php; fi
104107 - cat etc/volkszaehler.conf.php
105108
106109 # create database
@@ -112,15 +115,21 @@ before_script:
112115
113116 # setup local middleware
114117 - |
115- if [ "$TEST_ADAPTER " = "HTTP " ]; then
116- sed -i "s/testAdapter\" value=\".*\"/testAdapter\" value=\"$TEST_ADAPTER \"/" phpunit.xml
118+ if [ "$TEST_COMPONENT " = "HTTPD " ]; then
119+ sed -i "s/testAdapter\" value=\".*\"/testAdapter\" value=\"$TEST_COMPONENT \"/" phpunit.xml
117120 vendor/bin/httpd.php start &
118121 HTTPD_PID=$!
119122 echo "Started httpd with pid $HTTPD_PID"
120123 fi
121124
125+ # push server tests
126+ - if [ "$TEST_COMPONENT" = "PUSH_SERVER" ]; then sed -i "s/\?>/\$config['push']['enabled']\ =\ true\;\n?>/" etc/volkszaehler.conf.php; fi
127+ - if [ "$TEST_COMPONENT" = "PUSH_SERVER" ]; then
128+ php misc/tools/push-server.php &
129+ fi
130+
122131after_script :
123- - if [ "$TEST_ADAPTER " = "HTTP " ]; then kill -9 $HTTPD_PID; fi
132+ - if [ "$TEST_COMPONENT " = "HTTPD " ]; then kill -9 $HTTPD_PID; fi
124133
125134script :
126135 # run core tests
@@ -129,7 +138,7 @@ script:
129138 # run aggregation tests (mysql only)
130139 - if [ "$DB" = "mysql" ]; then sed -i "s/\?>/\$config['aggregation']\ =\ true;\n?>/" etc/volkszaehler.conf.php; fi
131140 - |
132- if [ "$DB" = "mysql" -a "$TEST_ADAPTER " = "HTTP " ]; then
141+ if [ "$DB" = "mysql" -a "$TEST_COMPONENT " = "HTTPD " ]; then
133142 kill -9 $HTTPD_PID
134143 sleep 10
135144 vendor/bin/httpd.php start &
@@ -141,6 +150,9 @@ script:
141150 # run aggregation tool itself (mysql only)
142151 - if [ "$DB" = "mysql" ]; then php misc/tools/aggregate.php run -m delta -l hour; fi
143152
153+ # push server tests
154+ - if [ "$TEST_COMPONENT" = "PUSH_SERVER" ]; then phpunit --group pushserver; fi
155+
144156 # jslint javascript sources
145157 - if [ "$JSLINT" = true ]; then gulp jshint; fi
146158
0 commit comments