Skip to content

Commit

Permalink
Included Faust.txt and Moby.int into git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
cpockrandt committed Jul 14, 2018
1 parent d282914 commit 3ff8c61
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 34 deletions.
10 changes: 0 additions & 10 deletions test/download.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions test/download.config

This file was deleted.

34 changes: 14 additions & 20 deletions test/download_files.cmake
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
## download
## Download files specified in a ${CMAKE_CURRENT_LIST_DIR}/download.config
# Each file should be specified on a seperate line as tuple (file;URL)
# TODO: move to CMakeLists.txt? or is it needed by examples/tutorials?
# TODO: should the files be made a target?

file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/download.config download_config_lines REGEX "^[^#].*")
foreach(download_config_line ${download_config_lines})
list(GET download_config_line 0 download_file)
list(GET download_config_line 1 download_url)
string(REPLACE ".tar.gz" "" download_file_we ${download_file})
set(abs_test_case_name ${CMAKE_CURRENT_LIST_DIR}/test_cases/${download_file_we})

add_custom_command(OUTPUT ${abs_test_case_name}
COMMAND ${CMAKE_COMMAND} -Ddownload_url=${download_url} -Dtest_case_dir=${CMAKE_CURRENT_LIST_DIR}/test_cases -P ${CMAKE_CURRENT_LIST_DIR}/download.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
COMMENT "Checking or downloading test case ${download_file}."
VERBATIM
)
add_custom_target(${download_file_we}
DEPENDS ${abs_test_case_name})
list(APPEND generated_files ${abs_test_case_name})
endforeach(download_config_line)
# TODO: path correct?
file(GLOB ZIPPED_TEST_CASES ${CMAKE_CURRENT_LIST_DIR}/test_cases/*.tar.gz)

file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_cases")

foreach(zipped_test_case ${ZIPPED_TEST_CASES})
get_filename_component(file_name ${zipped_test_case} NAME)
string(REPLACE ".tar.gz" "" file_name ${file_name})
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/test_cases/${file_name}")
message("Unzipped ${file_name}")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${zipped_test_case}
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/test_cases/")
endif()
endforeach(zipped_test_case)
Binary file added test/test_cases/faust.txt.tar.gz
Binary file not shown.
Binary file added test/test_cases/moby.int.tar.gz
Binary file not shown.

0 comments on commit 3ff8c61

Please sign in to comment.