[CI] Add some actual tests to CMakeLists.txt and fix tests/util.sh

This commit is contained in:
Marko Viitanen 2022-04-28 22:14:11 +03:00
parent bfc646ee8b
commit b0a5bcda3b
2 changed files with 10 additions and 5 deletions

View file

@ -143,4 +143,10 @@ endif()
if(NOT DEFINED MSVC)
add_test( NAME external_symbols COMMAND ${PROJECT_SOURCE_DIR}/tests/test_external_symbols.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
add_test( NAME test_intra COMMAND ${PROJECT_SOURCE_DIR}/tests/test_intra.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
add_test( NAME test_invalid_input COMMAND ${PROJECT_SOURCE_DIR}/tests/test_invalid_input.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
add_test( NAME test_monochrome COMMAND ${PROJECT_SOURCE_DIR}/tests/test_monochrome.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
add_test( NAME test_lmcs COMMAND ${PROJECT_SOURCE_DIR}/tests/test_lmcs.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
add_test( NAME test_tools COMMAND ${PROJECT_SOURCE_DIR}/tests/test_tools.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
add_test( NAME test_slices COMMAND ${PROJECT_SOURCE_DIR}/tests/test_slices.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
endif()

View file

@ -47,8 +47,8 @@ valgrind_test() {
# No quotes for $valgrind because it expands to multiple (or zero)
# arguments.
print_and_run \
../libtool execute $valgrind \
../src/kvazaar -i "${yuvfile}" "--input-res=${dimensions}" -o "${vvcfile}" "$@"
$valgrind \
../bin/uvg266 -i "${yuvfile}" "--input-res=${dimensions}" -o "${vvcfile}" "$@"
print_and_run \
DecoderAppStatic -b "${vvcfile}"
@ -69,9 +69,8 @@ encode_test() {
prepare "${dimensions}" "${frames}" "${format}"
set +e
print_and_run \
../libtool execute \
../src/kvazaar -i "${yuvfile}" "--input-res=${dimensions}" -o "${vvcfile}" "$@"
print_and_run \
../bin/uvg266 -i "${yuvfile}" "--input-res=${dimensions}" -o "${vvcfile}" "$@"
actual_status="$?"
set -e
[ ${actual_status} -eq ${expected_status} ]