Merge pull request #171 from jbeich/freebsd

Unbreak `make check` on FreeBSD
This commit is contained in:
Arttu Ylä-Outinen 2017-06-28 15:25:24 +03:00 committed by GitHub
commit 61fc028eef
14 changed files with 43 additions and 43 deletions

View file

@ -1,17 +1,17 @@
TESTS = $(check_PROGRAMS) \
test_external_symbols.bash \
test_gop.bash \
test_interlace.bash \
test_intra.bash \
test_invalid_input.bash \
test_mv_constraint.bash \
test_owf_wpp_tiles.bash \
test_rate_control.bash \
test_slices.bash \
test_smp.bash \
test_tools.bash \
test_weird_shapes.bash
test_external_symbols.sh \
test_gop.sh \
test_interlace.sh \
test_intra.sh \
test_invalid_input.sh \
test_mv_constraint.sh \
test_owf_wpp_tiles.sh \
test_rate_control.sh \
test_slices.sh \
test_smp.sh \
test_tools.sh \
test_weird_shapes.sh
check_PROGRAMS = kvazaar_tests

View file

@ -1,8 +1,8 @@
#!/bin/bash
#!/bin/sh
# Check for external symbols without kvz_ prefix.
set -euo pipefail
set -eu${BASH+o pipefail}
if nm -go --defined-only ../src/.libs/libkvazaar.a | grep -v ' kvz_'; then
printf '%s\n' 'Only symbols prefixed with "kvz_" should be exported from libkvazaar.'

View file

@ -1,9 +1,9 @@
#!/bin/bash
#!/bin/sh
# Test GOP, with and without OWF.
set -eu
source util.bash
. "${0%/*}/util.sh"
common_args='-p0 --threads=2 --wpp --rd=0 --no-rdoq --no-deblock --no-sao --no-signhide --subme=0 --pu-depth-inter=1-3 --pu-depth-intra=2-3'
valgrind_test 264x130 10 $common_args --gop=8 -p0 --owf=1

View file

@ -1,6 +1,6 @@
#!/bin/bash
#!/bin/sh
set -eu
source util.bash
. "${0%/*}/util.sh"
valgrind_test 264x130 10 --source-scan-type=tff -p0 --preset=ultrafast --threads=2 --owf=1 --wpp

View file

@ -1,10 +1,10 @@
#!/bin/bash
#!/bin/sh
# Test all-intra coding.
set -eu
source util.bash
. "${0%/*}/util.sh"
common_args='264x130 10 -p1 --threads=2 --owf=1 --no-rdoq --no-deblock --no-sao --no-signhide'
valgrind_test $common_args --rd=1

View file

@ -1,8 +1,8 @@
#!/bin/bash
#!/bin/sh
# Test trying to use invalid input dimensions.
set -eu
source util.bash
. "${0%/*}/util.sh"
encode_test 1x65 1 1

View file

@ -1,7 +1,7 @@
#!/bin/bash
#!/bin/sh
set -eu
source util.bash
. "${0%/*}/util.sh"
valgrind_test 264x130 10 --threads=2 --owf=1 --preset=ultrafast --pu-depth-inter=0-3 --mv-constraint=frametilemargin
valgrind_test 264x130 10 --threads=2 --owf=1 --preset=ultrafast --subme=4 --mv-constraint=frametilemargin

View file

@ -1,11 +1,11 @@
#!/bin/bash
#!/bin/sh
# Test OWF, WPP and tiles. There is lots of separate branches of code
# related to owf == 0 and owf != 0, which is why all permutations are
# tried.
set -eu
source util.bash
. "${0%/*}/util.sh"
common_args='-p4 --rd=0 --no-rdoq --no-deblock --no-sao --no-signhide --subme=0 --pu-depth-inter=1-3 --pu-depth-intra=2-3'
valgrind_test 264x130 10 $common_args -r1 --owf=1 --threads=0 --no-wpp

View file

@ -1,6 +1,6 @@
#!/bin/bash
#!/bin/sh
set -eu
source util.bash
. "${0%/*}/util.sh"
valgrind_test 264x130 10 --bitrate=500000 -p0 -r1 --owf=1 --threads=2 --rd=0 --no-rdoq --no-deblock --no-sao --no-signhide --subme=0 --pu-depth-inter=1-3 --pu-depth-intra=2-3

View file

@ -1,7 +1,7 @@
#!/bin/bash
#!/bin/sh
set -eu
source util.bash
. "${0%/*}/util.sh"
valgrind_test 512x256 10 --threads=2 --owf=1 --preset=ultrafast --tiles=2x2 --slices=tiles
valgrind_test 264x130 10 --threads=2 --owf=1 --preset=ultrafast --slices=wpp

View file

@ -1,9 +1,9 @@
#!/bin/bash
#!/bin/sh
# Test SMP and AMP blocks.
set -eu
source util.bash
. "${0%/*}/util.sh"
valgrind_test 264x130 4 --threads=2 --owf=1 --wpp --smp
valgrind_test 264x130 4 --threads=2 --owf=1 --wpp --amp

View file

@ -1,9 +1,9 @@
#!/bin/bash
#!/bin/sh
# Test RDOQ, SAO, deblock and signhide and subme.
set -eu
source util.bash
. "${0%/*}/util.sh"
common_args='264x130 10 -p0 -r1 --threads=2 --wpp --owf=1 --rd=0'

View file

@ -1,7 +1,7 @@
#!/bin/bash
#!/bin/sh
set -eu
source util.bash
. "${0%/*}/util.sh"
valgrind_test 16x16 10 --threads=2 --owf=1 --preset=veryslow
valgrind_test 256x16 10 --threads=2 --owf=1 --preset=veryslow

View file

@ -1,15 +1,15 @@
#!/bin/bash
#!/bin/sh
# Helper functions for test scripts.
set -euo pipefail
set -eu${BASH+o pipefail}
# Temporary files for encoder input and output.
yuvfile="$(mktemp --tmpdir tmp.XXXXXXXXXX.yuv)"
hevcfile="$(mktemp --tmpdir tmp.XXXXXXXXXX.hevc)"
yuvfile="$(mktemp)"
hevcfile="$(mktemp)"
cleanup() {
rm -rf ${yuvfile} ${hevcfile}
rm -rf "${yuvfile}" "${hevcfile}"
}
trap cleanup EXIT
@ -22,7 +22,7 @@ prepare() {
cleanup
print_and_run \
ffmpeg -f lavfi -i "mandelbrot=size=${1}" \
-vframes "${2}" -pix_fmt yuv420p \
-vframes "${2}" -pix_fmt yuv420p -f yuv4mpegpipe \
"${yuvfile}"
}
@ -61,5 +61,5 @@ encode_test() {
../src/kvazaar -i "${yuvfile}" "--input-res=${dimensions}" -o "${hevcfile}" "$@"
actual_status="$?"
set -e
[[ ${actual_status} = ${expected_status} ]]
[ ${actual_status} -eq ${expected_status} ]
}