1 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
3 # This file is part of GnuTLS.
5 # The launch_server() function was contributed by Cedric Arbogast.
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # This file is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this file; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 echo "Failure: $1" >&2
32 $SERV $DEBUG -p $PORT $
* >/dev
/null
2>&1 &
34 trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15
37 if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then
38 # Houston, we'v got a problem...
39 echo "Failed to launch a gnutls-serv server !"
44 launch_bare_server
() {
47 $SERV $
* >/dev
/null
2>&1 &
49 trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15
52 if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then
53 # Houston, we'v got a problem...
54 echo "Failed to launch server !"
64 trap "fail \"Failed to launch a gnutls-serv server, aborting test... \"" 10