Changeset c12a5c8


Ignore:
Timestamp:
2011-01-04T01:00:00Z (13 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.

Location:
skype/t
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skype/t/irssi/skype-msg.test

    r6f5ab2a rc12a5c8  
    99/expectbee 'Account successfully added' -command 'msg $$C account 0 set test_join true'
    1010/expectbee 'test_join' -command 'msg $$C account 0 on'
     11# use builtin test service
     12/expectjoin echo123 -command 'msg $$C echo123: ping, say pong'
     13/expectbee 'pong' -command 'quit Test Passed'
     14# use a public bot as well, just in case the above one would fail
    1115/expectjoin echo123 -command 'msg $$C add skype pam_bot'
    1216/expectjoin pam_bot -command 'msg $$C pam_bot: pambot help'
  • 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.