Ignore:
Timestamp:
2011-01-04T01:00:00Z (14 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
ab094d9
Parents:
6f5ab2a
Message:

Make tests a bit more robust

Sometimes skyped exits on startup because of the failure of some
underlying C lib (ie we get no expections), that's not something I want
to care about.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/t/livetest-bitlbee.sh

    r6f5ab2a rc12a5c8  
    11#!/usr/bin/env bash
     2
     3start_skyped()
     4{
     5        python ../skyped.py "$@" > skypedtest.pid
     6        while true
     7        do
     8                [ -e skypedtest.pid ] || break
     9                pid=$(sed 's/.*: //' skypedtest.pid)
     10                if [ -e /proc/$pid ]; then
     11                        sleep 5
     12                else
     13                        start_skyped "$@"
     14                        break
     15                fi
     16        done
     17}
     18
    219BITLBEE=$1
    320typeset -ix PORT=`echo $2 | egrep '^[0-9]{1,5}$'`
     
    4663
    4764        # Run skyped
    48         python ../skyped.py -c skyped.conf -l skypedtest.log > skypedtest.pid
     65        start_skyped -c skyped.conf -l skypedtest.log &
    4966        sleep 2
    5067fi
     
    6885        # Kill skyped
    6986        killall -TERM skype
    70         kill -TERM $(sed 's/.*: //' skypedtest.pid)
     87        if [ -f skypedtest.pid ]; then
     88                pid=$(sed 's/.*: //' skypedtest.pid)
     89                rm skypedtest.pid
     90                [ -e /proc/$pid ] && kill -TERM $pid
     91        fi
    7192fi
    7293
Note: See TracChangeset for help on using the changeset viewer.