Debian Codegraph @

debian/tests/lib

raw
1 #!/bin/bash
2
3 set -e
4
5
6 MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
7
8 # Make sure the library is correctly linked (to prevent regression on #1029939):
9 [ $(ldd -r /usr/lib/$MULTIARCH/libshaderc.so | grep -c "undefined symbol") -eq 0 ]
10
11
12 cd $AUTOPKGTEST_TMP
13
14 dummy_source=dummy.c
15 dummy_binary=dummy
16
17 # From https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/shaderc.rb:
18 cat > $dummy_source <<EOF
19 #include <shaderc/shaderc.h>
20 int main() {
21 int version;
22 shaderc_profile profile;
23 if (!shaderc_parse_version_profile("450core", &version, &profile))
24 return 1;
25 return (profile == shaderc_profile_core) ? 0 : 1;
26 }
27 EOF
28
29 g++ -o $dummy_binary $dummy_source $(pkg-config --libs --cflags shaderc)
30 test -x $dummy_binary
31 ./$dummy_binary