@@ -36,6 +36,15 @@ set(RESTART_MAIN_FOLDER "NamesAreNotGuaranteedToBeUniqueAcrossPlans_0")
36
36
set (RESULT_FILE "Result_chunks_0_of_11.grib" )
37
37
set (RESTART_ID "none" )
38
38
39
+ ecbuild_add_test(
40
+ TARGET ${PREFIX} _clean_dir
41
+ COMMAND ${CMAKE_COMMAND}
42
+ ARGS -E remove_directory ${CMAKE_CURRENT_BINARY_DIR} /${RESTART_MAIN_FOLDER}
43
+ )
44
+ set_tests_properties (${PREFIX} _clean_dir PROPERTIES
45
+ FIXTURES_SETUP ${PREFIX} _clean_dir
46
+ )
47
+
39
48
ecbuild_add_test(
40
49
TARGET ${PREFIX} _run_0-24_new_restart
41
50
CONDITION HAVE_ATLAS_IO
@@ -44,21 +53,11 @@ ecbuild_add_test(
44
53
COMMAND multio-feed
45
54
ARGS --stepRange=0-24 --decode --plans=${CMAKE_CURRENT_SOURCE_DIR} /test -restart.yaml standard_0_statistics_test_data.grib
46
55
)
56
+ set_tests_properties (${PREFIX} _run_0-24_new_restart PROPERTIES
57
+ FIXTURES_SETUP ${PREFIX} _run_0-24_new_restart
58
+ FIXTURES_REQUIRED ${PREFIX} _clean_dir
59
+ )
47
60
48
- # ecbuild_add_test(
49
- # TARGET ${PREFIX}_check_metadata_0-24_new_restart
50
- # TEST_DEPENDS ${PREFIX}_run_0-24_new_restart
51
- # ARGS -H "Result_chunks_0_of_11.grib" "Reference_chunks_0_of_11.grib"
52
- # COMMAND grib_compare
53
- # )
54
- #
55
- # ecbuild_add_test(
56
- # TARGET ${PREFIX}_check_values_0-24_new_restart
57
- # TEST_DEPENDS ${PREFIX}_check_metadata_0-24_new_restart
58
- # ARGS -P -T10 "Result_chunks_0_of_11.grib" "Reference_chunks_0_of_11.grib"
59
- # COMMAND grib_compare
60
- # )
61
- #
62
61
# Set the number of steps and loop through them
63
62
set (NUM_STEPS 11)
64
63
set ( prevStepRange "0-24" )
@@ -82,27 +81,16 @@ foreach(i RANGE 1 ${NUM_STEPS})
82
81
83
82
# Run the multio-feed command
84
83
ecbuild_add_test(
85
- TARGET ${PREFIX} _run_${stepRange} _new_restart
86
- CONDITION HAVE_ATLAS_IO
87
- TEST_DEPENDS ${PREFIX} _check_metadata_${prevStepRange} _new_restart
88
- ENVIRONMENT READ_RESTART=${READ_RESTART} WRITE_RESTART=${WRITE_RESTART} RESTART_MAIN_FOLDER=${RESTART_MAIN_FOLDER} RESULT_FILE=${RESULT_FILE} RESTART_ID=${RESTART_ID}
89
- COMMAND multio-feed
90
- ARGS --stepRange=${stepRange} --decode --plans=${CMAKE_CURRENT_SOURCE_DIR} /test -restart.yaml standard_0_statistics_test_data.grib
84
+ TARGET ${PREFIX} _run_${stepRange} _new_restart
85
+ CONDITION HAVE_ATLAS_IO
86
+ ENVIRONMENT READ_RESTART=${READ_RESTART} WRITE_RESTART=${WRITE_RESTART} RESTART_MAIN_FOLDER=${RESTART_MAIN_FOLDER} RESULT_FILE=${RESULT_FILE} RESTART_ID=${RESTART_ID}
87
+ COMMAND multio-feed
88
+ ARGS --stepRange=${stepRange} --decode --plans=${CMAKE_CURRENT_SOURCE_DIR} /test -restart.yaml standard_0_statistics_test_data.grib
89
+ )
90
+ set_tests_properties (${PREFIX} _run_${stepRange} _new_restart PROPERTIES
91
+ FIXTURES_SETUP ${PREFIX} _run_${stepRange} _new_restart
92
+ FIXTURES_REQUIRED ${PREFIX} _run_${prevStepRange} _new_restart
91
93
)
92
-
93
- # ecbuild_add_test(
94
- # TARGET ${PREFIX}_check_metadata_${stepRange}_new_restart
95
- # TEST_DEPENDS ${PREFIX}_run_${stepRange}_new_restart
96
- # ARGS -H "Result_chunks_${i}_of_11.grib" "Reference_chunks_${i}_of_11.grib"
97
- # COMMAND grib_compare
98
- # )
99
- #
100
- # ecbuild_add_test(
101
- # TARGET ${PREFIX}_check_values_${stepRange}_new_restart
102
- # TEST_DEPENDS ${PREFIX}_check_metadata_${stepRange}_new_restart
103
- # ARGS -P -T10 "Result_chunks_${i}_of_11.grib" "Reference_chunks_${i}_of_11.grib"
104
- # COMMAND grib_compare
105
- # )
106
94
107
95
set ( prevStepRange "${stepRange} " )
108
96
@@ -124,34 +112,45 @@ ecbuild_add_test(
124
112
COMMAND multio-feed
125
113
ARGS --decode --plans=${CMAKE_CURRENT_SOURCE_DIR} /test -restart.yaml standard_0_statistics_test_data.grib
126
114
)
115
+ set_tests_properties (${PREFIX} _run_single_chunk_new_restart PROPERTIES
116
+ FIXTURES_SETUP ${PREFIX} _run_single_chunk_new_restart
117
+ FIXTURES_REQUIRED ${PREFIX} _clean_dir
118
+ )
127
119
128
120
ecbuild_add_test(
129
- TARGET ${PREFIX} _check_metadata_single_chunk_new_restart
130
- TEST_DEPENDS ${PREFIX} _run_single_chunk_new_restart
131
- ARGS -H "Result_single_chunk.grib" "Reference_single_chunk.grib"
132
- COMMAND grib_compare
121
+ TARGET ${PREFIX} _check_metadata_single_chunk_new_restart
122
+ ARGS -H "Result_single_chunk.grib" "Reference_single_chunk.grib"
123
+ COMMAND grib_compare
124
+ )
125
+ set_tests_properties (${PREFIX} _check_metadata_single_chunk_new_restart PROPERTIES
126
+ FIXTURES_REQUIRED "${PREFIX} _run_${stepRange} _new_restart;${PREFIX} _run_single_chunk_new_restart"
133
127
)
134
128
135
129
ecbuild_add_test(
136
- TARGET ${PREFIX} _check_values_single_chunk_new_restart
137
- TEST_DEPENDS ${PREFIX} _check_metadata_single_chunk_new_restart
138
- ARGS -P -T10 "Result_single_chunk.grib" "Reference_single_chunk.grib"
139
- COMMAND grib_compare
130
+ TARGET ${PREFIX} _check_values_single_chunk_new_restart
131
+ ARGS -P -T10 "Result_single_chunk.grib" "Reference_single_chunk.grib"
132
+ COMMAND grib_compare
133
+ )
134
+ set_tests_properties (${PREFIX} _check_values_single_chunk_new_restart PROPERTIES
135
+ FIXTURES_REQUIRED "${PREFIX} _run_${stepRange} _new_restart;${PREFIX} _run_single_chunk_new_restart"
140
136
)
141
-
142
137
143
138
#
144
139
# Final comparison
145
140
ecbuild_add_test(
146
- TARGET ${PREFIX} _check_metadata_singleVSrestart_chunk_new_restart
147
- TEST_DEPENDS ${PREFIX} _check_values_single_chunk_new_restart
148
- ARGS -H "Result_chunks_11_of_11.grib" "Result_single_chunk.grib"
149
- COMMAND grib_compare
141
+ TARGET ${PREFIX} _check_metadata_singleVSrestart_chunk_new_restart
142
+ ARGS -H "Result_chunks_11_of_11.grib" "Result_single_chunk.grib"
143
+ COMMAND grib_compare
144
+ )
145
+ set_tests_properties (${PREFIX} _check_metadata_singleVSrestart_chunk_new_restart PROPERTIES
146
+ FIXTURES_REQUIRED "${PREFIX} _run_${stepRange} _new_restart;${PREFIX} _run_single_chunk_new_restart"
150
147
)
151
148
152
149
ecbuild_add_test(
153
- TARGET ${PREFIX} _check_values_singleVSrestart_chunk_new_restart
154
- TEST_DEPENDS ${PREFIX} _check_metadata_singleVSrestart_chunk_new_restart
155
- ARGS -P -T10 "Result_chunks_11_of_11.grib" "Result_single_chunk.grib"
156
- COMMAND grib_compare
157
- )
150
+ TARGET ${PREFIX} _check_values_singleVSrestart_chunk_new_restart
151
+ ARGS -P -T10 "Result_chunks_11_of_11.grib" "Result_single_chunk.grib"
152
+ COMMAND grib_compare
153
+ )
154
+ set_tests_properties (${PREFIX} _check_values_singleVSrestart_chunk_new_restart PROPERTIES
155
+ FIXTURES_REQUIRED "${PREFIX} _run_${stepRange} _new_restart;${PREFIX} _run_single_chunk_new_restart"
156
+ )
0 commit comments