~ubuntu-branches/ubuntu/breezy/orbit2/breezy

« back to all changes in this revision

Viewing changes to test/everything/test.sh

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-09-06 16:37:02 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050906163702-hrqi0ctymth53bnn
Tags: 1:2.12.4-0ubuntu1
* New upstream version.
* debian/patches/100-compile-name-server.patch:
  - updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# This is a generic script for firing up a server, waiting for it to write
4
4
# its stringified IOR to a file, then firing up a server
5
5
 
6
 
# We had issues creating this once, and it gives us a 'clean' slate.
7
 
rm -Rf "/tmp/orbit-$USER"
8
 
 
9
 
for params in '--ORBIIOPIPv4=0 --ORBIIOPUSock=1' '--ORBIIOPIPv4=1 --ORBIIOPUSock=0' ; do
10
 
 
11
 
    ./server $params &
 
6
if test "z$ORBIT_TMPDIR" = "z"; then
 
7
        ORBIT_TMPDIR="/tmp/orbit-$USER/tst"
 
8
        rm -Rf $ORBIT_TMPDIR
 
9
        mkdir -p $ORBIT_TMPDIR
 
10
fi
 
11
TMPDIR=$ORBIT_TMPDIR;
 
12
export TMPDIR;
 
13
 
 
14
# 100: socket path max - Posix.1g
 
15
SAMPLE_NAME="$ORBIT_TMPDIR/orbit-$USER/linc-78fe-0-14c0fc671d5b4";
 
16
echo "Sample name: '$SAMPLE_NAME'"
 
17
if (test ${#SAMPLE_NAME} -gt 100); then
 
18
    echo "Socket directory path '$ORBIT_TMPDIR' too long for bind";
 
19
    exit 1;
 
20
else
 
21
    echo "Running with socketdir: '$ORBIT_TMPDIR'";
 
22
fi
 
23
 
 
24
run_test() {
 
25
    
 
26
    echo testing with $1
 
27
 
 
28
    ./server $1 &
12
29
 
13
30
    until test -s iorfile; do sleep 1; done
14
31
 
15
 
    if ./client $params; then
 
32
    if ./client $1; then
16
33
        echo "============================================================="
17
 
        echo "Test passed with params: $params"
 
34
        echo "Test passed with params: $1"
18
35
        echo "============================================================="
19
36
        rm iorfile
20
37
    else
21
38
        echo "============================================================="
22
 
        echo "Test failed with params: $params"
 
39
        echo "Test failed with params: $1"
 
40
        echo "  if this is an IPv4 test, can you ping `hostname` ?"
23
41
        echo "============================================================="
24
42
        kill $!
 
43
        test x"$DONT_EXIT" = x && exit 1
25
44
        rm iorfile
26
 
        exit 1
27
45
    fi
28
 
 
 
46
}
 
47
 
 
48
for params in '--ORBIIOPIPv4=1 --ORBIIOPUSock=0 --ORBCorbaloc=1' \
 
49
              '--ORBIIOPIPv4=1 --ORBIIOPUSock=0 --thread-tests'  \
 
50
              '--ORBIIOPIPv4=1 --ORBIIOPUSock=0'                 \
 
51
              '--ORBIIOPIPv4=1 --ORBIIOPUSock=0 --thread-safe'   \
 
52
              '--ORBIIOPIPv4=1 --ORBIIOPUSock=0 --gen-imodule'
 
53
do
 
54
 
 
55
    run_test "$params"
29
56
done
 
57
 
 
58
# Don't run the Unix domain socket tests on Windows
 
59
if test x"$WINDIR" = x; then
 
60
    for params in '--ORBIIOPIPv4=0 --ORBIIOPUSock=1 --ORBCorbaloc=1' \
 
61
                  '--ORBIIOPIPv4=0 --ORBIIOPUSock=1 --thread-tests'  \
 
62
                  '--ORBIIOPIPv4=0 --ORBIIOPUSock=1'                 \
 
63
                  '--ORBIIOPIPv4=0 --ORBIIOPUSock=1 --thread-safe'   \
 
64
                  '--ORBIIOPIPv4=0 --ORBIIOPUSock=1 --gen-imodule'
 
65
    do
 
66
 
 
67
        run_test "$params"
 
68
    done
 
69
fi