summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
blob: 238144cc65f5f40eeeb03a455285cbe560f00005 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
if(NOT UNIX)
    return()
endif()

if(WIN32)
    set(EXEEXT .exe)
endif()
set(top_srcdir "${PROJECT_SOURCE_DIR}")
set(top_builddir "${PROJECT_BINARY_DIR}")
configure_file(common.sh.in common.sh @ONLY)

set(ALL_TESTS libFLAC grabbag flac metaflac replaygain seeking streams compression)

add_test(NAME libFLAC
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_libFLAC.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
if(BUILD_CXXLIBS)
    add_test(NAME libFLAC++
        COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_libFLAC++.sh"
        WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    list(APPEND ALL_TESTS libFLAC++)
endif()
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cuesheets")
add_test(NAME grabbag
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_grabbag.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_test(NAME flac
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_flac.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/metaflac-test-files")
add_test(NAME metaflac
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_metaflac.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_test(NAME replaygain
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_replaygain.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_test(NAME seeking
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_seeking.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_test(NAME streams
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_streams.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
#   increase this if standard 1500 seconds are not enough
#   set_tests_properties(streams PROPERTIES TIMEOUT 1500)
add_test(NAME compression
    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test_compression.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

set_property(TEST ${ALL_TESTS} APPEND PROPERTY ENVIRONMENT ECHO_C=\\c)