~linaro-foundations/linaro-ubuntu/lava-test-basic-graphics

« back to all changes in this revision

Viewing changes to basic-graphics-test.sh

  • Committer: Ricardo Salveti de Araujo
  • Date: 2012-01-19 01:13:20 UTC
  • Revision ID: ricardo.salveti@linaro.org-20120119011320-mmddkw7dez68635m
Moving test logs for stderr, so it can be available easily at LAVA

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#
21
21
# Author: Ricardo Salveti <rsalveti@linaro.org>
22
22
#
23
 
# TODO: * Generate a useful log file with the detailed output
24
 
#       * Make sure LAVA can make the log file available
 
23
 
 
24
set -x
25
25
 
26
26
DEFAULT_USER="linaro"
27
27
 
40
40
        | awk -F "\"" {'print $2'}`
41
41
    dbus-send --system --type=method_call --print-reply \
42
42
        --dest=org.freedesktop.Accounts ${dbus_user_path} \
43
 
        org.freedesktop.Accounts.User.SetXSession string:$session \
44
 
        > /dev/null 2>&1
 
43
        org.freedesktop.Accounts.User.SetXSession string:$session 1>&2
45
44
}
46
45
 
47
46
kill_xorg() {
48
47
    pid=`pidof /usr/bin/X`
49
48
    if [ "x$pid" != "x" ]; then
50
 
        kill -9 $pid > /dev/null 2>&1
 
49
        kill -9 $pid 1>&2
51
50
    fi
52
51
    rm -f /tmp/.X0-lock
53
52
}
58
57
test_xorg() {
59
58
    TEST="xorg_running"
60
59
    if ! service lightdm status | grep -q "start\/running"; then
61
 
        service lightdm start > /dev/null
 
60
        service lightdm start 1>&2
62
61
        check_return_fail "lightdm start" && return 1
63
62
        sleep 10 # give enough time to start and possibly fail
64
63
    fi
65
64
 
66
 
    pidof "/usr/bin/X" > /dev/null
 
65
    pidof "/usr/bin/X" 1>&2
67
66
    check_return_fail "Xorg not running" && return 1
68
67
 
69
68
    pass_test
73
72
test_unity2d() {
74
73
    TEST="unity_2d_running"
75
74
 
76
 
    service lightdm stop > /dev/null 2>&1
 
75
    service lightdm stop 1>&2
77
76
    sleep 2 # to die in peace
78
77
    set_lightdm_session ubuntu-2d
79
 
    service lightdm start > /dev/null 2>&1
 
78
    service lightdm start 1>&2
80
79
    check_return_fail "lightdm start" && return 1
81
80
 
82
81
    sleep 120
83
 
    pidof "/usr/bin/unity-2d-panel" > /dev/null
 
82
    pidof "/usr/bin/unity-2d-panel" 1>&2
84
83
    check_return_fail "unity-2d-panel not running" && return 1
85
 
    pidof "/usr/bin/unity-2d-launcher" > /dev/null
 
84
    pidof "/usr/bin/unity-2d-launcher" 1>&2
86
85
    check_return_fail "unity-2d-launcher not running" && return 1
87
86
 
88
87
    pass_test
92
91
test_unity3d() {
93
92
    TEST="unity_3d_running"
94
93
 
95
 
    service lightdm stop > /dev/null 2>&1
 
94
    service lightdm stop 1>&2
96
95
    sleep 2 # to die in peace
97
96
    set_lightdm_session ubuntu
98
 
    service lightdm start > /dev/null 2>&1
 
97
    service lightdm start 1>&2
99
98
    check_return_fail "lightdm start" && return 1
100
99
 
101
100
    sleep 180
102
 
    pidof "/usr/bin/compiz" > /dev/null
 
101
    pidof "/usr/bin/compiz" 1>&2
103
102
    check_return_fail "compiz not running" && return 1
104
 
    pidof "/usr/bin/unity-window-decorator" > /dev/null
 
103
    pidof "/usr/bin/unity-window-decorator" 1>&2
105
104
    check_return_fail "unity-window-decorator not running" && return 1
106
 
    pidof "/usr/lib/unity/unity-panel-service" > /dev/null
 
105
    pidof "/usr/lib/unity/unity-panel-service" 1>&2
107
106
    check_return_fail "unity-panel-service not running" && return 1
108
107
 
109
108
    pass_test
113
112
test_unity_support() {
114
113
    TEST="nux_tools_unity_support"
115
114
 
116
 
    service lightdm stop > /dev/null 2>&1
 
115
    service lightdm stop 1>&2
117
116
    kill_xorg
118
117
    sleep 2 # to die in peace
119
 
    (/usr/bin/X :0 > /dev/null 2>&1 &)
 
118
    (/usr/bin/X -verbose 10 :0 1>&2 &)
120
119
    export DISPLAY=:0.0
121
120
    check_return_fail "Xorg failed to start" && return 1
122
121
 
123
122
    sleep 5
124
 
    /usr/lib/nux/unity_support_test > /dev/null 2>&1
 
123
    /usr/lib/nux/unity_support_test 1>&2
125
124
    check_return_fail "unity 3d is not supported" && return 1
126
125
 
127
126
    pass_test
131
130
test_opengles_driver() {
132
131
    TEST="valid_not_mesa_opengles_driver"
133
132
 
134
 
    service lightdm stop > /dev/null 2>&1
 
133
    service lightdm stop 1>&2
135
134
    kill_xorg
136
135
    sleep 2 # to die in peace
137
 
    (/usr/bin/X :0 > /dev/null 2>&1 &)
 
136
    (/usr/bin/X -verbose 10 :0 1>&2 &)
138
137
    export DISPLAY=:0.0
139
138
    check_return_fail "Xorg failed to start" && return 1
140
139