~ubuntu-x-swat/xorg-server/xsmoke

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash

if [ -e ../lib/xsmoke.lib ] ; then
    . ../lib/xsmoke.lib
elif [ -e lib/xsmoke.lib ] ; then
    . lib/xsmoke.lib
fi


RUNTIME=20
INT=1
MOVIE="$HOME/Examples/Experience ubuntu.ogg"
WNAME=$(basename $MOVIE)

if [ ! -e "$MOVIE" ]; then
    die "Movie '$MOVIE' not found"
fi

totem "$MOVIE" &
PID=$!

for i in $(seq 1 $INT $RUNTIME); do
    test_count=$(( $test_count + 1 ))

    sleep $INT
    x=$(( $i * 25 ))
    y=$x
    wmctrl -r $WNAME -e 0,$x,$y,-1,-1
    if [ $? = 0 ]; then
        pass "Moved totem window"
    else
        fail "Totem window could not be moved successfully"
    fi

done

# Close totem gracefully
test_count=$(( $test_count + 1 ))
wmctrl -c $WNAME
if [ $? = 0 ]; then
    pass "Closed totem window"
else
    fail "Problem encountered closing totem window"
fi


echo "Completed all tests"
print_test_summary