Debian Codegraph @

debian/tests/smoke-build

raw
1 #!/bin/sh
2 # autopkgtest check: Build and run a simple program against SFML
3
4 set -e
5
6 # Require $AUTOPKGTEST_TMP for temporary build files
7 if [ -z "$AUTOPKGTEST_TMP" ]
8 then
9 echo "Required envvar \"$AUTOPKGTEST_TMP\"is not set" >&2
10 exit 1
11 fi
12
13 cp debian/tests/smoke_test.cpp "$AUTOPKGTEST_TMP"
14 cd "$AUTOPKGTEST_TMP"
15
16 # Build programs - once with raw libraries and once with pkgconf
17 g++ -Wall -Werror -o sfml_test1 smoke_test.cpp -lsfml-network -lsfml-system
18 echo "build1: OK"
19 g++ -Wall -Werror -o sfml_test2 smoke_test.cpp $(pkgconf --cflags --libs sfml-all)
20 echo "build2: OK"
21 g++ -Wall -Werror -o sfml_test3 smoke_test.cpp $(pkgconf --cflags --libs sfml-network sfml-system)
22 echo "build3: OK"
23
24 # Run them
25 ./sfml_test1
26 echo "run1: OK"
27 ./sfml_test2
28 echo "run2: OK"
29 ./sfml_test3
30 echo "run3: OK"