File: upstream-testsuite

package info (click to toggle)
libsndfile 1.2.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,180 kB
  • sloc: ansic: 55,354; cpp: 1,108; python: 791; makefile: 545; sh: 538; cs: 122
file content (34 lines) | stat: -rwxr-xr-x 911 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
#!/bin/sh
DEB_HOST_MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)

echo "running test $0 for ${DEB_HOST_MULTIARCH}"

build_make_sine() {
if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
else
    CROSS_COMPILE=
fi

# Deliberately word-splitting pkgconf's output:
# shellcheck disable=SC2046
"${CROSS_COMPILE}gcc" -oexamples/make_sine examples/make_sine.c -lm $("${CROSS_COMPILE}pkgconf" --cflags --libs sndfile)
}

cp -v /usr/lib/${DEB_HOST_MULTIARCH}/sndfile/tests/* tests/
mv -v tests/test_main src/

#sed -e 's|^PYTHON=.*|PYTHON=skiptest\nskiptest() { echo "skipping $@"\n}|' -i tests/test_wrapper.sh

# fix paths in metadata test
sed -i \
	-e 's|\./\(sndfile-metadata-.et\)|/usr/bin/\1|' \
	programs/test-sndfile-metadata-set.py


# prepare the make_sine executable for tests
build_make_sine

# now run the tests
chmod +x tests/test_wrapper.sh
tests/test_wrapper.sh 2>&1