directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1676064 - in /directory/apacheds/trunk/installers/src/test/docker: archive.test run-tests.sh
Date Sat, 25 Apr 2015 20:16:41 GMT
Author: seelmann
Date: Sat Apr 25 20:16:41 2015
New Revision: 1676064

URL: http://svn.apache.org/r1676064
Log:
No tty on Jenkins

Modified:
    directory/apacheds/trunk/installers/src/test/docker/archive.test
    directory/apacheds/trunk/installers/src/test/docker/run-tests.sh

Modified: directory/apacheds/trunk/installers/src/test/docker/archive.test
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers/src/test/docker/archive.test?rev=1676064&r1=1676063&r2=1676064&view=diff
==============================================================================
--- directory/apacheds/trunk/installers/src/test/docker/archive.test (original)
+++ directory/apacheds/trunk/installers/src/test/docker/archive.test Sat Apr 25 20:16:41 2015
@@ -37,6 +37,11 @@ set -e
 # trace commands
 set -x
 
+HAVE_TTY=0
+if [ "`tty`" != "not a tty" ]; then
+    HAVE_TTY=1
+fi
+
 # install
 cd /opt
 if [ -f /apacheds.tar.gz ]
@@ -59,7 +64,12 @@ test -x /opt/${DIRNAME}/bin/apacheds.sh
 test -d /opt/${DIRNAME}/instances/default
 
 # assert not running
-/opt/${DIRNAME}/bin/apacheds.sh status | grep "ApacheDS is not running"
+if [ $HAVE_TTY -eq 1 ]
+then
+    /opt/${DIRNAME}/bin/apacheds.sh status | grep "ApacheDS is not running"
+else
+    ! /opt/${DIRNAME}/bin/apacheds.sh status
+fi
 
 # install required tools
 apt-get -qq update
@@ -70,7 +80,12 @@ apt-get -qq -y install ldap-utils netcat
 wait_for_apacheds_up
 
 # assert running
-/opt/${DIRNAME}/bin/apacheds.sh status | grep "ApacheDS is running"
+if [ $HAVE_TTY -eq 1 ]
+then
+    /opt/${DIRNAME}/bin/apacheds.sh status | grep "ApacheDS is running"
+else
+    /opt/${DIRNAME}/bin/apacheds.sh status
+fi
 
 # search
 ldapsearch -h localhost -p 10389 -x -D "uid=admin,ou=system" -w secret -s base -b "dc=example,dc=com"
@@ -90,7 +105,12 @@ done
 wait_for_apacheds_down
 
 # assert not running
-/opt/${DIRNAME}/bin/apacheds.sh status | grep "ApacheDS is not running"
+if [ $HAVE_TTY -eq 1 ]
+then
+    /opt/${DIRNAME}/bin/apacheds.sh status | grep "ApacheDS is not running"
+else
+    ! /opt/${DIRNAME}/bin/apacheds.sh status
+fi
 
 # assert password warning in log
 grep ".*WARN.*admin password.*security breach.*" /opt/${DIRNAME}/instances/default/log/apacheds.log

Modified: directory/apacheds/trunk/installers/src/test/docker/run-tests.sh
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers/src/test/docker/run-tests.sh?rev=1676064&r1=1676063&r2=1676064&view=diff
==============================================================================
--- directory/apacheds/trunk/installers/src/test/docker/run-tests.sh (original)
+++ directory/apacheds/trunk/installers/src/test/docker/run-tests.sh Sat Apr 25 20:16:41 2015
@@ -84,7 +84,7 @@ then
     echo
     echo
     echo "Testing tar.gz archive with official Java image (Debian 8, OpenJDK 8, 64bit)"
-    docker run -it --rm \
+    docker run -i --rm \
       -v ${TGZ}:/apacheds.tar.gz \
       -v ${project.build.directory}/docker/archive.test:/archive.test \
       java:8 bash /archive.test
@@ -98,7 +98,7 @@ then
     echo
     echo
     echo "Testing zip archive with 'dockerfile' Java image (Ubuntu 14.04, Oracle Java 7,
64bit)"
-    docker run -it --rm \
+    docker run -i --rm \
       -v ${ZIP}:/apacheds.zip \
       -v ${project.build.directory}/docker/archive.test:/archive.test \
       dockerfile/java:oracle-java7 bash /archive.test



Mime
View raw message