wesnoth icon indicating copy to clipboard operation
wesnoth copied to clipboard

1.19.0: test suite fails in `SDL2_AUDIO_SUPPORT` unit

Open kloczek opened this issue 1 year ago • 6 comments

Game and System Information

  • Version: 1.19.0
  • OS: Linux x86/64

Description of the bug

Looks like test suite fails in one unit

+ cd wesnoth-1.19.0
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48 ' '
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/wesnoth-1.19.0/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/wesnoth-1.19.0/x86_64-redhat-linux-gnu
    Start 1: SDL2_SUPPORT
    Start 2: SDL2_IMAGE_SUPPORT
    Start 3: SDL2_MIXER_SUPPORT
    Start 4: SDL2_JPG_SUPPORT
    Start 5: SDL2_PNG_SUPPORT
    Start 6: SDL2_WEBP_SUPPORT
    Start 7: SDL2_AUDIO_SUPPORT
1/7 Test #1: SDL2_SUPPORT .....................   Passed    0.01 sec
2/7 Test #2: SDL2_IMAGE_SUPPORT ...............   Passed    0.01 sec
3/7 Test #3: SDL2_MIXER_SUPPORT ...............   Passed    0.01 sec
4/7 Test #4: SDL2_JPG_SUPPORT .................   Passed    0.01 sec
5/7 Test #5: SDL2_PNG_SUPPORT .................   Passed    0.01 sec
6/7 Test #6: SDL2_WEBP_SUPPORT ................   Passed    0.01 sec
7/7 Test #7: SDL2_AUDIO_SUPPORT ...............***Failed    0.01 sec
Cannot initialize SDL Audio: dsp: No such audio device\n


86% tests passed, 1 tests failed out of 7

Total Test time (real) =   0.02 sec

The following tests FAILED:
          7 - SDL2_AUDIO_SUPPORT (Failed)
Errors while running CTest

Steps to reproduce the behavior

  • build with below cmake settings cmake settings
-- Cache values
BINARY_PREFIX:STRING=
BINARY_SUFFIX:STRING=
BUILD_TESTING:BOOL=ON
Boost_COROUTINE_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_coroutine.so.1.84.0
Boost_FILESYSTEM_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_filesystem.so.1.84.0
Boost_GRAPH_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_graph.so.1.84.0
Boost_INCLUDE_DIR:PATH=/usr/include
Boost_IOSTREAMS_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_iostreams.so.1.84.0
Boost_LOCALE_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_locale.so.1.84.0
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_program_options.so.1.84.0
Boost_RANDOM_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_random.so.1.84.0
Boost_REGEX_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_regex.so.1.84.0
Boost_SYSTEM_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_system.so.1.84.0
Boost_THREAD_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_thread.so.1.84.0
Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_unit_test_framework.so.1.84.0
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
CXX_FLAGS_USER:STRING=-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security
DATADIRNAME:STRING=wesnoth
DEFAULT_PREFS_FILE:STRING=
ENABLE_APPDATA_FILE:BOOL=ON
ENABLE_CAMPAIGN_SERVER:BOOL=ON
ENABLE_DEBUG_WINDOW_LAYOUT:BOOL=OFF
ENABLE_DESIGN_DOCUMENTS:BOOL=OFF
ENABLE_DESKTOP_ENTRY:BOOL=ON
ENABLE_DISPLAY_REVISION:BOOL=OFF
ENABLE_GAME:BOOL=ON
ENABLE_LTO:BOOL=OFF
ENABLE_MYSQL:BOOL=OFF
ENABLE_NLS:BOOL=ON
ENABLE_NOTIFICATIONS:BOOL=ON
ENABLE_PEDANTIC_COMPILATION:BOOL=OFF
ENABLE_POT_UPDATE_TARGET:BOOL=OFF
ENABLE_SERVER:BOOL=ON
ENABLE_STRICT_COMPILATION:BOOL=OFF
ENABLE_SYSTEM_LUA:BOOL=OFF
ENABLE_TESTS:BOOL=ON
EXECUTABLE_OUTPUT_PATH:STRING=/home/tkloczko/rpmbuild/BUILD/wesnoth-1.19.0/x86_64-redhat-linux-gnu
FIFO_DIR:STRING=/run/wesnothd
FORCE_COLOR_OUTPUT:BOOL=OFF
GETTEXT_MSGFMT_EXECUTABLE:FILEPATH=/usr/bin/msgfmt
GETTEXT_MSGMERGE_EXECUTABLE:FILEPATH=/usr/bin/msgmerge
GLIBCXX_ASSERTIONS:BOOL=OFF
GLIBCXX_DEBUG:BOOL=OFF
HARDEN:BOOL=ON
LOCALEDIR:STRING=/usr/share/locale
PREFERENCES_DIR:STRING=
PROFILER:STRING=
SDL2_DIR:PATH=/usr/lib64/cmake/SDL2
SERVER_GID:STRING=wesnothd
SERVER_UID:STRING=wesnothd
X11_xcb_xkb_INCLUDE_PATH:PATH=/usr/include
  • execute ctest

Expected behavior

test suite should not fail

Additional context

No response

kloczek avatar Jun 09 '24 18:06 kloczek

Sounds like #2137?

Pentarctagon avatar Jun 09 '24 18:06 Pentarctagon

I'm not using scon but cmake.

kloczek avatar Jun 09 '24 19:06 kloczek

I don't think cmake vs scons is relevant here. Also needs more info on where this is being run.

Pentarctagon avatar Jun 09 '24 20:06 Pentarctagon

I don't think cmake vs scons is relevant here. Also needs more info on where this is being run.

This information is in first two lines provided output

+ cd wesnoth-1.19.0
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48 ' 

x86_64-redhat-linux-gnu it is directory generated by cmake -B x86_64-redhat-linux-gnu <cmake_options>

kloczek avatar Jun 09 '24 20:06 kloczek

Right, but what kind of environment is this using that doesn't have an audio device? These exact tests are run each commit for our CI and pass.

Pentarctagon avatar Jun 09 '24 20:06 Pentarctagon

I'd suspect it's because you're not using make conftests. The error No such audio device was fixed in the issue I linked before, which was done by setting the dummy audio driver: https://github.com/wesnoth/wesnoth/blob/971073055e2487560940790cc340d91cd8d8e8df/src/CMakeLists.txt#L197-L207

Pentarctagon avatar Jun 09 '24 20:06 Pentarctagon

Any update on this? Noting the 'needs info' status.

Wedge009 avatar Feb 14 '25 04:02 Wedge009

Re-open if still an issue.

Wedge009 avatar Feb 23 '25 20:02 Wedge009