CMakeLists.txt (958B)
1 function(kaldi_native_fbank_add_py_test source) 2 get_filename_component(name ${source} NAME_WE) 3 set(name "${name}_py") 4 5 message(STATUS "source: ${source}") 6 7 add_test(NAME ${name} 8 COMMAND 9 "${PYTHON_EXECUTABLE}" 10 "${CMAKE_CURRENT_SOURCE_DIR}/${source}" 11 ) 12 13 get_filename_component(kaldi_native_fbank_path ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) 14 15 set_property(TEST ${name} 16 PROPERTY ENVIRONMENT "PYTHONPATH=${kaldi_native_fbank_path}:$<TARGET_FILE_DIR:_kaldi_native_fbank>:$ENV{PYTHONPATH}" 17 ) 18 endfunction() 19 20 # please sort the files in alphabetic order 21 set(py_test_files 22 test_fbank_options.py 23 test_feature_window_function.py 24 test_frame_extraction_options.py 25 test_mel_bank_options.py 26 test_online_whisper_fbank.py 27 test_online_fbank.py 28 test_online_mfcc.py 29 # test_rfft.py 30 ) 31 32 if(KALDI_NATIVE_FBANK_BUILD_TESTS) 33 foreach(source IN LISTS py_test_files) 34 kaldi_native_fbank_add_py_test(${source}) 35 endforeach() 36 endif()