diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a1b1b80e2..195725045 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -43,3 +43,46 @@ if ( LIBSNDFILE_HASVORBIS ) ADD_FLUID_TEST(test_sf3_sfont_loading) ADD_FLUID_SF_DUMP_TEST(VintageDreamsWaves-v2.sf3) endif ( LIBSNDFILE_HASVORBIS ) + + +# Prepare the manual test suite down here +if(NOT DEFINED GENERAL_USER_GS2) + add_custom_target(check_manual + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red "In order to run the manual test suite, you need to set variable GENERAL_USER_GS2 to the path of the soundfont.") +else() + + set(IIR_FILTER_RENDER_DIR "${CMAKE_CURRENT_BINARY_DIR}/manual/iir_filter/") + + if(LIBSNDFILE_SUPPORT) + set(FEXT "wav") + else() + set(FEXT "raw") + endif() + + # Add an empty pseudo target + add_custom_target(check_manual) + + add_custom_target(create_iir_dir + COMMAND ${CMAKE_COMMAND} -E make_directory ${IIR_FILTER_RENDER_DIR}) + + add_custom_target(render1415 + COMMAND fluidsynth -R 0 -C 0 -g 1 -F ${CMAKE_CURRENT_BINARY_DIR}/manual/iir_filter/1415_the-nervous-filter.${FEXT} "The Nervous Filter trimmed.mid" ${GENERAL_USER_GS2} + COMMENT "Rendering testfile of issue 1415" + DEPENDS fluidsynth create_iir_dir + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/manual/iir_filter/1415_the-nervous-filter/ + VERBATIM + ) + + add_custom_target(render1417 + COMMAND fluidsynth -R 0 -C 0 -g 1 -F ${CMAKE_CURRENT_BINARY_DIR}/manual/iir_filter/1417_filter-envelope-noise.${FEXT} filter-envelope-noise.mid ${GENERAL_USER_GS2} + COMMENT "Rendering testfile of issue 1417" + DEPENDS fluidsynth create_iir_dir + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/manual/iir_filter/1417_filter-envelope-noise/ + VERBATIM + ) + + # Add a dependency so that rendering targets depends on check_manual + add_dependencies(check_manual render1415) + add_dependencies(check_manual render1417) + +endif()