~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
#!/bin/bash

. $(dirname $)/lib/xsmoke.lib

usage () {
    cat <<EOF
Usage:  $0
    This test suite must be run with X and gdm shut down, and needs to
    be run as the root user.
EOF
}

if ! is_superuser ; then
    echo "This must be run as root"
    exit 1
fi

# Check that X is NOT up and running currently
if is_running "gdm" || is_running "X" ; then
    echo "Please exit all X sessions and shut down gdm before running this test"
    exit 1
fi

# TODO:  Create results directory

# Check prerequisites
for case in tests/xst-*.sh ; do
    $case prerequisites
    test_xorg_restart
done

# Run the tests
for case in tests/xst-*.sh ; do
    result_file=${RESULTS_DIR}"/"${case%.sh}.json
    $case $result_file
    test_xorg_restart
done

# TODO:  Print testrun summary