Skip to content

Commit 5602105

Browse files
committed
Grouped commons tests into folders
This commit also changes the src/tests/CmakeLists.txt to build tests within their new folders
1 parent 4b335f3 commit 5602105

File tree

151 files changed

+148
-122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+148
-122
lines changed

src/tests/CMakeLists.txt

+148-122
Original file line numberDiff line numberDiff line change
@@ -42,98 +42,98 @@ endif()
4242
include_directories(${TEST_EXT_INCLUDE_DIRS})
4343

4444
set(PROGRAMS
45-
pdc_init
46-
# create_prop
47-
# create_region
48-
# create_obj_coll
49-
# set_prop
50-
dup_prop
51-
read_obj
52-
read_obj_shared
53-
# create_cont
54-
# create_cont_coll
55-
open_cont
56-
cont_life
57-
cont_iter
58-
cont_info
59-
cont_del
60-
cont_getid
61-
cont_tags
62-
consistency_semantics
63-
create_obj
64-
open_obj
65-
open_existing_obj
66-
obj_info
67-
obj_del
68-
obj_iter
69-
obj_life
70-
# obj_dim
71-
obj_buf
72-
obj_tags
73-
obj_put_data
74-
obj_get_data
75-
read_write_perf
76-
read_write_col_perf
77-
region_transfer_partial
78-
region_transfer_2D_partial
79-
region_transfer_3D_partial
80-
region_transfer_overlap
81-
region_transfer_overlap_2D
82-
region_transfer_overlap_3D
83-
region_transfer_merge
84-
obj_round_robin_io
85-
obj_round_robin_io_all
86-
# close_server
87-
# stat_obj
88-
delete_obj
89-
vpicio
90-
vpicio_mts
91-
bdcats
92-
vpicio_old
93-
bdcats_old
94-
# cont_add_del
95-
# data_server_meta_test
96-
kvtag_add_get
97-
# kvtag_get
98-
kvtag_query
99-
# obj_transformation
100-
region_transfer_query
101-
region_transfer
102-
region_transfer_status
103-
region_transfer_skewed
104-
region_transfer_2D
105-
# region_transfer_2D_skewed
106-
region_transfer_3D
107-
# region_transfer_3D_skewed
108-
region_transfer_write_only
109-
region_transfer_read_only
110-
region_transfer_write_read
111-
region_transfer_all
112-
region_transfer_all_2D
113-
region_transfer_all_3D
114-
region_transfer_all_append
115-
region_transfer_all_append_2D
116-
region_transfer_all_append_3D
117-
region_transfer_all_split_wait
118-
region_transfer_set_dims
119-
region_transfer_set_dims_2D
120-
region_transfer_set_dims_3D
121-
#query_vpic_create_data
122-
#query_vpic
123-
#query_vpic_multi
124-
#query_vpic_multi_preload
125-
#query_vpic_multi_nopreload
126-
#query_vpic_bin_sds_preload
127-
#query_vpic_bin_sds_nopreload
128-
#query_vpic_bin_sds1_preload
129-
#query_vpic_bin_sds1_nopreload
130-
#query_vpic_multi_nopreload1
131-
#gen_fastbit_idx
132-
#query_vpic_exyz_nopreload
133-
#query_vpic_exyz_preload
134-
query_data
135-
producer_waitall
136-
)
45+
misc/pdc_init
46+
#prop/create_prop
47+
#region/create_region
48+
#obj/create_obj_coll
49+
#propset_prop
50+
prop/dup_prop
51+
obj/read_obj
52+
obj/read_obj_shared
53+
#cont/create_cont
54+
#cont/create_cont_coll
55+
cont/open_cont
56+
cont/cont_life
57+
cont/cont_iter
58+
cont/cont_info
59+
cont/cont_del
60+
cont/cont_getid
61+
cont/cont_tags
62+
locks/consistency_semantics
63+
obj/create_obj
64+
obj/open_obj
65+
obj/open_existing_obj
66+
obj/obj_info
67+
obj/obj_del
68+
obj/obj_iter
69+
obj/obj_life
70+
#obj/obj_dim
71+
obj/obj_buf
72+
obj/obj_tags
73+
obj/obj_put_data
74+
obj/obj_get_data
75+
misc/read_write_perf
76+
misc/read_write_col_perf
77+
region/region_transfer_partial
78+
region/region_transfer_2D_partial
79+
region/region_transfer_3D_partial
80+
region/region_transfer_overlap
81+
region/region_transfer_overlap_2D
82+
region/region_transfer_overlap_3D
83+
region/region_transfer_merge
84+
obj/obj_round_robin_io
85+
obj/obj_round_robin_io_all
86+
#misc/close_server
87+
#obj/stat_obj
88+
obj/delete_obj
89+
misc/vpicio
90+
misc/vpicio_mts
91+
misc/bdcats
92+
misc/vpicio_old
93+
misc/bdcats_old
94+
#cont/cont_add_del
95+
#misc/data_server_meta_test
96+
tags/kvtag_add_get
97+
#tags/kvtag_get
98+
tags/kvtag_query
99+
#obj/obj_transformation
100+
region/region_transfer_query
101+
region/region_transfer
102+
region/region_transfer_status
103+
region/region_transfer_skewed
104+
region/region_transfer_2D
105+
#region/region_transfer_2D_skewed
106+
region/region_transfer_3D
107+
#region/region_transfer_3D_skewed
108+
region/region_transfer_write_only
109+
region/region_transfer_read_only
110+
region/region_transfer_write_read
111+
region/region_transfer_all
112+
region/region_transfer_all_2D
113+
region/region_transfer_all_3D
114+
region/region_transfer_all_append
115+
region/region_transfer_all_append_2D
116+
region/region_transfer_all_append_3D
117+
region/region_transfer_all_split_wait
118+
region/region_transfer_set_dims
119+
region/region_transfer_set_dims_2D
120+
region/region_transfer_set_dims_3D
121+
#query/query_vpic_create_data
122+
#query/query_vpic
123+
#query/query_vpic_multi
124+
#query/query_vpic_multi_preload
125+
#query/query_vpic_multi_nopreload
126+
#query/query_vpic_bin_sds_preload
127+
#query/query_vpic_bin_sds_nopreload
128+
#query/query_vpic_bin_sds1_preload
129+
#query/query_vpic_bin_sds1_nopreload
130+
#query/query_vpic_multi_nopreload1
131+
#misc/gen_fastbit_idx
132+
#query/query_vpic_exyz_nopreload
133+
#query/query_vpic_exyz_preload
134+
query/query_data
135+
misc/producer_waitall
136+
)
137137

138138
# TODO: Check if import_vpic.c is needed. If yes, we have to add the following :
139139
# if (HDF5_FOUND)
@@ -143,42 +143,59 @@ set(PROGRAMS
143143
# message(FATAL_ERROR "Could not find HDF5, please make sure that HDF5 has been compiled with shared libraries enabled.")
144144
# endif()
145145

146-
147146
foreach(program ${PROGRAMS})
148-
add_executable(${program} ${program}.c)
149-
target_link_libraries(${program} pdc pdc_commons ${TEST_EXT_LIB})
150-
target_include_directories(${program} PRIVATE ${TEST_EXT_INCLUDE_DIRS})
151-
endforeach(program)
147+
get_filename_component(program_name ${program} NAME)
148+
get_filename_component(program_dir ${program} DIRECTORY)
149+
150+
set(SOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${program}.c")
151+
152+
if(EXISTS ${SOURCE_FILE})
153+
add_executable(${program_name} ${SOURCE_FILE})
154+
target_include_directories(${program_name} PRIVATE "${CMAKE_SOURCE_DIR}/include")
155+
target_link_libraries(${program_name} pdc pdc_commons ${TEST_EXT_LIB})
156+
else()
157+
message(WARNING "Source file ${SOURCE_FILE} not found, skipping ${program_name}.")
158+
endif()
159+
endforeach()
152160

153161
if(BUILD_MPI_TESTING)
154162
set(MPI_PROGRAMS
155-
kvtag_range_query_scale
156-
kvtag_affix_query_scale
157-
kvtag_add_get_benchmark
158-
kvtag_add_get_scale
159-
llsm_idioms_bench
160-
idioms_ci_test
163+
tags/kvtag_range_query_scale
164+
tags/kvtag_affix_query_scale
165+
tags/kvtag_add_get_benchmark
166+
tags/kvtag_add_get_scale
167+
misc/llsm_idioms_bench
168+
misc/idioms_ci_test
161169
)
162170

163171
foreach(program ${MPI_PROGRAMS})
164-
add_executable(${program} ${program}.c)
165-
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
166-
target_compile_options(${program} PRIVATE ${SUPPRESSED_LIST})
172+
get_filename_component(program_name ${program} NAME)
173+
get_filename_component(program_dir ${program} DIRECTORY)
174+
175+
set(SOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${program_dir}/${program_name}.c")
176+
177+
if(EXISTS ${SOURCE_FILE})
178+
add_executable(${program_name} ${SOURCE_FILE})
179+
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
180+
target_compile_options(${program_name} PRIVATE ${SUPPRESSED_LIST})
181+
endif()
182+
target_link_libraries(${program_name} pdc pdc_commons ${TEST_EXT_LIB})
183+
target_include_directories(${program_name} PRIVATE ${TEST_EXT_INCLUDE_DIRS})
184+
else()
185+
message(WARNING "Source file ${SOURCE_FILE} not found, skipping ${program_name}.")
167186
endif()
168-
target_link_libraries(${program} pdc pdc_commons ${TEST_EXT_LIB})
169-
target_include_directories(${program} PRIVATE ${TEST_EXT_INCLUDE_DIRS})
170-
endforeach(program)
187+
endforeach()
171188
endif()
172189

173190

174191
if(UUID_FOUND)
175192
message(STATUS "UUID library found: ${UUID_LIBRARIES}")
176193
message(STATUS "UUID include directory: ${UUID_INCLUDE_DIRS}")
177194
set(ENHANCED_PROGRAMS
178-
dart_algo_sim
179-
dart_attr_dist_test
180-
dart_func_test
181-
dart_test
195+
dart/dart_algo_sim
196+
dart/dart_attr_dist_test
197+
dart/dart_func_test
198+
dart/dart_test
182199
)
183200

184201
set(TEST_EXT_LIB ${TEST_EXT_LIB} ${UUID_LIBRARIES})
@@ -198,9 +215,18 @@ if(UUID_FOUND)
198215
endif(PDC_ENABLE_JULIA)
199216

200217
foreach(program ${ENHANCED_PROGRAMS})
201-
add_executable(${program} ${program}.c ${EXTRA_SRC_FILE})
202-
target_link_libraries(${program} pdc pdc_commons ${TEST_EXT_LIB})
203-
target_include_directories(${program} PRIVATE ${TEST_EXT_INCLUDE_DIRS})
218+
get_filename_component(program_name ${program} NAME)
219+
get_filename_component(program_dir ${program} DIRECTORY)
220+
221+
set(SOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${program}.c")
222+
223+
if(EXISTS ${SOURCE_FILE})
224+
add_executable(${program_name} ${SOURCE_FILE} ${EXTRA_SRC_FILE})
225+
target_link_libraries(${program_name} pdc pdc_commons ${TEST_EXT_LIB})
226+
target_include_directories(${program_name} PRIVATE ${TEST_EXT_INCLUDE_DIRS})
227+
else()
228+
message(WARNING "Source file ${SOURCE_FILE} not found, skipping ${program_name}.")
229+
endif()
204230
endforeach(program)
205231
endif(UUID_FOUND)
206232

@@ -211,13 +237,13 @@ set(SCRIPTS
211237
run_multiple_test.sh
212238
run_multiple_mpi_test.sh
213239
run_checkpoint_restart_test.sh
214-
)
240+
)
215241

216242
foreach(script ${SCRIPTS})
217243
file(
218-
COPY ${script} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
219-
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE WORLD_READ WORLD_EXECUTE
220-
)
244+
COPY ${script} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
245+
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE WORLD_READ WORLD_EXECUTE
246+
)
221247
endforeach(script)
222248

223249

@@ -229,15 +255,15 @@ endforeach(script)
229255
OPTION(GEN_TRANSFORM_LIB "Create a transform library" OFF)
230256
if(GEN_TRANSFORM_LIB)
231257
FIND_LIBRARY(BLOSC_LIBRARY blosc $ENV{HOME}/Sandbox/c-blosc/build/blosc)
232-
set(PDC_TRANSFORMS_SRCS pdc_transforms_lib.c)
258+
set(PDC_TRANSFORMS_SRCS transforms/pdc_transforms_lib.c)
233259
add_library(pdctransforms ${PDC_TRANSFORMS_SRCS})
234260
target_link_libraries(pdctransforms pdc ${BLOSC_LIBRARY})
235261
endif()
236262

237263
# *******************************************
238264
# Create a transform library for testing
239265
# *******************************************
240-
set(PDC_ANALYSIS_SRCS pdc_analysis_lib.c)
266+
set(PDC_ANALYSIS_SRCS analysis/pdc_analysis_lib.c)
241267
add_library(pdcanalysis ${PDC_ANALYSIS_SRCS})
242268
target_link_libraries(pdcanalysis pdc)
243269

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)