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

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

# Back up the current configuration
cp "$DEFAULT_XORG_CONF" "$DEFAULT_XORG_CONF.orig"
if [ $? != 0 ]; then
    die "Could not backup xorg.conf"
fi

# Check syntax of various scripts and programs
test_syntax_bash "/usr/bin/dexconf"

# Verify Xorg restarts correctly as currently configured
test_xorg_restart

# Generate a new xorg.conf file and test it
test_xorg_conf_creation

# Verify Xorg restarts correctly with new configuration
test_xorg_restart

# Restore original xorg.conf
if [ -f "$DEFAULT_XORG_CONF.orig" ]; then
    mv "$DEFAULT_XORG_CONF.orig" "$DEFAULT_XORG_CONF"
fi

# Verify Xorg restarts correctly as currently configured
test_xorg_restart

echo "Completed all tests"
print_test_summary