File: upstream-tests

package info (click to toggle)
libcsfml 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,240 kB
  • sloc: cpp: 7,741; ansic: 2,616; sh: 805; makefile: 16
file content (42 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download
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
#!/bin/sh
# autopkgtest check: Build and run the upstream testsuite

set -ex

# Require $AUTOPKGTEST_TMP for temporary build files
if [ -z "$AUTOPKGTEST_TMP" ]
then
	echo "Required envvar \"$AUTOPKGTEST_TMP\"is not set" >&2
	exit 1
fi

# Build tests
CSFML_SOURCE="$PWD"
cd "$AUTOPKGTEST_TMP"

cp "$CSFML_SOURCE/debian/tests/CMakeLists.txt.upstream" CMakeLists.txt
cmake . -DCSFML_SOURCE="$CSFML_SOURCE" -DCMAKE_BUILD_TYPE=Debug
make "-j$(nproc)" VERBOSE=1
echo "build: OK"

# WIP
ctest --verbose
echo "tests: OK"
exit 0

# Spawn a dummy X server to run the tests in
export DISPLAY=:99
cp "$CSFML_SOURCE/debian/tests/xorg-dummy.conf" .

trap 'kill $XORG_PID' INT TERM EXIT
Xorg -noreset -logfile ./xorg.log -config ./xorg-dummy.conf "$DISPLAY" &
XORG_PID=$!
sleep 1

# Run the tests
#  TODO The sf::Window tests fail with the dummy Xorg server because
#  the server does not present any visuals with MSAA support.
#  My hunch is it's related to this Mesa MR:
#  https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31019
ctest --verbose --exclude-regex 'sf::Window$'
echo "tests: OK"