Skip to content

Commit

Permalink
[TEST] Removed zarathustra, included text files into repo
Browse files Browse the repository at this point in the history
  • Loading branch information
cpockrandt committed Oct 6, 2018
1 parent 645adda commit 6c4742c
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 46 deletions.
3 changes: 1 addition & 2 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ target will be `your-structure-test`.

## Acknowledgements
We thank
* Project Gutenberg for providing text files `faust.txt` and
`zarathustra.txt`.
* Project Gutenberg for providing text files `faust.txt`.
* Shane Culpepper for providing the test inputs
`keeper.int` and `moby.int` for the integer-alphabet CSAs and CSTs.

Expand Down
1 change: 0 additions & 1 deletion test/csa_byte_test.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ empty.txt
example01.txt
100a.txt
faust.txt
zarathustra.txt
3 changes: 1 addition & 2 deletions test/csa_int_test.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Each line contains [TEST_CASE_NAME];[NUM_BYTE]
# Each line contains [TEST_CASE_NAME];[NUM_BYTE]
empty.txt;1
example01.txt;1
100a.txt;1
faust.txt;1
zarathustra.txt;1
keeper.int;8
moby.int;8
1 change: 0 additions & 1 deletion test/cst_byte_test.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ empty.txt
example01.txt
100a.txt
faust.txt
#zarathustra.txt
3 changes: 1 addition & 2 deletions test/cst_int_test.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Texts which should be used in the CstIntTest.
# Each line contains [TEST_CASE_FILE];[NUM_BYTE]
# Each line contains [TEST_CASE_FILE];[NUM_BYTE]
empty.txt;1
example01.txt;1
100a.txt;1
faust.txt;1
#zarathustra.txt;1
keeper.int;8
moby.int;8
int-vec-sa.100000.18.r;0
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)
1 change: 0 additions & 1 deletion test/lcp_construct_test.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ empty.txt
example01.txt
100a.txt
faust.txt
zarathustra.txt
1 change: 0 additions & 1 deletion test/sa_construct_test.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ one_byte.txt
example01.txt
100a.txt
faust.txt
zarathustra.txt
1 change: 0 additions & 1 deletion test/search_bidirectional_test.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ empty.txt
example01.txt
100a.txt
faust.txt
zarathustra.txt
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.
1 change: 0 additions & 1 deletion test/wt_byte_test.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ example01.txt
100a.txt
all_symbols.txt
faust.txt
#zarathustra.txt

0 comments on commit 6c4742c

Please sign in to comment.