File: run-tests-in-xvfb.sh

package info (click to toggle)
kate 4:18.08.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 30,500 kB
  • sloc: xml: 87,988; cpp: 38,094; ansic: 1,805; sh: 95; makefile: 23
file content (24 lines) | stat: -rwxr-xr-x 394 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

# want build dir as first parameter
BUILDDIR=$1

# go to build dir or die
cd $BUILDDIR || exit 1

# start Xvfb
Xvfb :7 -ac >/dev/null 2>&1 &

# save pid for later kill
XPID=$!

# wait bit for X
echo "Waiting for Xvfb with pid $XPID to launch..."
sleep 2

# execute tests on that screen
DISPLAY=:7 make test

# kill the poor X again
echo "Killing Xvfb with pid $XPID..."
kill $XPID