Debian Codegraph @

debian/tests/smoke

raw
1 #!/bin/sh
2
3 # Smoke test to install mumble and mumble-server to insure that the binaries
4 # actually built and are installed, and get some very simple text output.
5
6 set -e
7
8 # Generic path environment variables setup
9 cd $AUTOPKGTEST_TMP
10 export HOME=$PWD/home
11 mkdir -p $HOME
12 export TMP=$PWD
13 export TMPDIR=$PWD
14
15 echo "Starting basic smoke test."
16
17 # Mumble test currently causes a QT error:
18 ## qt.qpa.xcb: could not connect to display
19 ## This test is commented out until the required test dependencies are found
20 ##
21 # Reported upstream: https://github.com/mumble-voip/mumble/issues/6193
22 echo "Create $HOME/.local/share/data/Mumble needed for 'mumble --version'"
23 mkdir -p $HOME/.local/share/data/Mumble
24
25 echo "Executing /usr/bin/mumble --version"
26 MUMBLE_VERSION=$(/usr/bin/xvfb-run -a /usr/bin/mumble --version 2>/dev/null | grep "Mumble version [0-9]\.[0-9]\.[0-9]")
27 if [ -n "$MUMBLE_VERSION" ] ; then
28 echo "Found: $MUMBLE_VERSION"
29 else
30 echo "Error: Mumble version found: $MUMBLE_VERSION" >&2
31 exit 1
32 fi
33
34 echo "Executing /usr/bin/mumble-server --version"
35 SERVER_VERSION=$(/usr/bin/mumble-server --version | grep "Mumble server version [0-9]\.[0-9]\.[0-9]")
36 if [ -n "$SERVER_VERSION" ] ; then
37 echo "Found: $SERVER_VERSION"
38 else
39 echo "Error: mumble-server version found: $SERVER_VERSION" >&2
40 exit 1
41 fi
42 # If script gets to this point, smoke tests pass
43 echo "Smoke test passed."
44 exit 0