Ubuntu Pastebin

Paste from kenvandine at Wed, 24 Aug 2016 17:17:40 +0000

Download as text
 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
#!/bin/sh

# start X
(Xvfb :5 >/dev/null 2>&1 &)
XVFB_PID=$!
export DISPLAY=:5

# start local session D-BUS
eval `dbus-launch`
trap "kill $DBUS_SESSION_BUS_PID $XVFB_PID" 0 TERM QUIT INT
export DBUS_SESSION_BUS_ADDRESS
export XAUTHORITY=/dev/null

oktests="content-hub-test-ok"
badtests="content-hub-test-bad"
FAILED=""

upstart --user --no-startup-event &
initctl notify-dbus-address $DBUS_SESSION_BUS_ADDRESS

export CONTENT_HUB_LOGGING_LEVEL=2
content-hub-service&

for a in $oktests; do
    content-hub-test-importer &2>/dev/null
    content-hub-test-exporter content-hub-test-importer file:///etc/issue $a 2>/dev/null
    if [ $? -ne 0 ]; then
        FAILED="$FAILED $a"
    fi
done

for b in $badtests; do
    content-hub-test-importer &2>/dev/null
    content-hub-test-exporter content-hub-test-importer file:///etc/issue $b 2>/dev/null
    if [ $? -eq 0 ]; then
        FAILED="$FAILED $b"
    fi
done

if [ -z "$FAILED" ]; then
    echo "All tests passed"
    exit 0
else
    echo "$FAILED failed"
    exit 1
fi
Download as text