From: Jason Etheridge Date: Tue, 16 Jul 2013 16:01:42 +0000 (-0400) Subject: integrate pgTAP with a -t option for live testing X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8f6f27cf9542e1dbc5f5e709de99c641a08ff42d;p=working%2Frandom.git integrate pgTAP with a -t option for live testing Signed-off-by: Jason Etheridge --- diff --git a/installer/wheezy/eg_wheezy_installer.sh b/installer/wheezy/eg_wheezy_installer.sh index 53a394b42..e7a2974c7 100755 --- a/installer/wheezy/eg_wheezy_installer.sh +++ b/installer/wheezy/eg_wheezy_installer.sh @@ -29,13 +29,14 @@ ADMIN_PASS='demo123'; # ----------------------------------------------------------------------- # Handling passed arguments to the script # ----------------------------------------------------------------------- -while getopts ays option +while getopts ayst option do case "${option}" in a) AUTOSTART=1;; y) YES=1;; s) SAMPLEDATA=--load-all-sample;; + t) LIVETEST=1;; esac done @@ -86,6 +87,9 @@ apt-get update; apt-get -yq dist-upgrade; apt-get -yq install build-essential automake git psmisc ntp rsyslog; +if [ $LIVETEST ]; then + cpan TAP::Parser::SourceHandler::pgTAP +fi; cp $BASE_DIR/evergreen.ld.conf /etc/ld.so.conf.d/ ldconfig; @@ -102,7 +106,7 @@ fi; OPENSRF_REPO='git://git.evergreen-ils.org/OpenSRF.git' OPENSRF_BRANCH='master' EVERGREEN_REPO='git://git.evergreen-ils.org/working/Evergreen.git' -EVERGREEN_BRANCH='collab/berick/per-distro-install-makefiles' +EVERGREEN_BRANCH='collab/phasefx/pgtap-and-per-distro-install-makefiles' OSRF_COMMAND=" cd /home/opensrf; git clone --depth 0 --branch $OPENSRF_BRANCH $OPENSRF_REPO OpenSRF; @@ -209,6 +213,19 @@ perl Open-ILS/src/support-scripts/eg_db_config \ --admin-user $ADMIN_USER \ --admin-pass $ADMIN_PASS; +if [ $LIVETEST ]; then + PG_CMD=" + git clone --depth 0 https://github.com/theory/pgtap.git \ + && cd pgtap \ + && make \ + && make installcheck + " + su - postgres -c "$PG_CMD" + cd /var/lib/postgresql/pgtap \ + && make install; + echo 'CREATE EXTENSION pgtap;' | su - postgres -c "psql evergreen" +fi; + # Copy apache configs into place and create SSL cert cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/ cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/ @@ -280,12 +297,20 @@ sed -i 's/KeepAliveTimeout .*/KeepAliveTimeout 1/' /etc/apache2/apache2.conf echo Restarting Apache /etc/init.d/apache2 restart -cat <