Skip to content

Commit 6f9cecc

Browse files
authored
Cleanup test gitignore (parflow#736)
The Python and TCL test gitignore files were outdated and Python version was overly aggressive in ignoring important input files. CMake indentation was not passing style checks.
1 parent aa0ffeb commit 6f9cecc

9 files changed

Lines changed: 264 additions & 249 deletions

File tree

test/python/.gitignore

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
1-
*.dat
1+
*.csv
22
*.out.*
3-
*_output*
4-
*.output*
5-
*.rst.*
3+
*.output.*
64
*.pfidb
7-
*.silo
8-
*.pfsol
9-
!.gitignore
5+
*.pfb.dist
6+
*_output.*
7+
*.dat.[0-9]*
8+
9+
new_features/clm/IndicatorFile_Gleeson.50z.pfb
10+
new_features/clm/LW.slopex.pfb
11+
new_features/clm/LW.slopey.pfb
12+
new_features/clm/NLDAS.APCP.000001_to_000024.pfb
13+
new_features/clm/NLDAS.DLWR.000001_to_000024.pfb
14+
new_features/clm/NLDAS.DSWR.000001_to_000024.pfb
15+
new_features/clm/NLDAS.Press.000001_to_000024.pfb
16+
new_features/clm/NLDAS.SPFH.000001_to_000024.pfb
17+
new_features/clm/NLDAS.Temp.000001_to_000024.pfb
18+
new_features/clm/NLDAS.UGRD.000001_to_000024.pfb
19+
new_features/clm/NLDAS.VGRD.000001_to_000024.pfb
20+
new_features/clm/clm_out.txt.0
21+
new_features/clm/drv_clmin.dat
22+
new_features/clm/drv_vegm.alluv.dat
23+
new_features/clm/drv_vegp.dat
24+
new_features/clm/press.init.pfb
25+
new_features/clm/washita_clm_croplands_landfrac.pfb
26+
new_features/clm/washita_clm_forest_dn_landfrac.pfb
27+
new_features/clm/washita_clm_grasslands_landfrac.pfb
28+
new_features/clm/washita_clm_savannas_landfrac.pfb
29+
new_features/drv_vegm.dat
30+
new_features/forest_eb_mat.pfb
31+
new_features/inline_input.txt
32+
new_features/sabino_domain.pfsol
33+
new_features/sabino_domain.vtk
34+
new_features/sabino_mask_written.sa
1035
stats4.txt
11-
*.pfb
12-
*.tcl
13-
*.asc
14-
*.sa
15-
*.txt
16-
clm/*
17-
clm_out*
18-
!clm/*.py
36+
washita/LW_Test.yaml
37+
38+
dconf
39+
test_output

test/python/CMakeLists.txt

Lines changed: 138 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -1,187 +1,190 @@
11
include(ParflowTest)
22

33
set(TESTS
4-
default_single
5-
default_single_read_porosity
6-
default_richards_wells
7-
forsyth2
8-
harvey_flow
9-
harvey_flow_pgs
10-
crater2D
11-
crater2D_vangtable_spline
12-
crater2D_vangtable_linear
13-
small_domain
14-
richards_hydrostatic_equilibrium
15-
indicator_field
16-
LW_surface_press
17-
overland_tiltedV_MGSemiTest
4+
default_single
5+
default_single_read_porosity
6+
default_richards_wells
7+
forsyth2
8+
harvey_flow
9+
harvey_flow_pgs
10+
crater2D
11+
crater2D_vangtable_spline
12+
crater2D_vangtable_linear
13+
small_domain
14+
richards_hydrostatic_equilibrium
15+
indicator_field
16+
LW_surface_press
17+
overland_tiltedV_MGSemiTest
1818
)
1919

2020
if(${PARFLOW_HAVE_HYPRE})
21-
list(APPEND TESTS
22-
bc_pressure_file
23-
bc_flux_file
24-
Dirichlet
25-
default_richards
26-
default_richards_restart
27-
default_richards_nocluster
28-
default_overland
29-
octree-simple
30-
octree-large-domain
31-
LW_var_dz
32-
LW_var_dz_spinup
33-
terrain_following_grid_overland
34-
var_dz_1D
35-
var_dz_with_well
36-
tilted_v_with_reservoir_overland_flow
37-
tilted_v_with_reservoir_overland_kinematic
38-
pfmg
39-
pfmg_galerkin
40-
smg
41-
pfmg_octree
42-
van-genuchten-file
43-
overland_flux
44-
overland_slopingslab_KWE
45-
overland_tiltedV_KWE
46-
overland_tiltedV_KWE_top_patch
47-
overland_tiltedV_KWE_top_patch_2
48-
overland_tiltedV_KWE_top_patch_3
49-
overland_slopingslab_DWE
50-
overland_tiltedV_DWE
51-
overland_FlatICP
52-
richards_FBx
53-
richards_FBy
54-
richards_box_proctest
55-
richards_box_proctest_vardz
56-
water_balance_y
57-
water_balance_x
58-
water_balance_x.hardflow.nojac
59-
water_balance_x.hardflow.jac
60-
channelwidth)
21+
list(
22+
APPEND TESTS
23+
bc_pressure_file
24+
bc_flux_file
25+
Dirichlet
26+
default_richards
27+
default_richards_restart
28+
default_richards_nocluster
29+
default_overland
30+
octree-simple
31+
octree-large-domain
32+
LW_var_dz
33+
LW_var_dz_spinup
34+
terrain_following_grid_overland
35+
var_dz_1D
36+
var_dz_with_well
37+
tilted_v_with_reservoir_overland_flow
38+
tilted_v_with_reservoir_overland_kinematic
39+
pfmg
40+
pfmg_galerkin
41+
smg
42+
pfmg_octree
43+
van-genuchten-file
44+
overland_flux
45+
overland_slopingslab_KWE
46+
overland_tiltedV_KWE
47+
overland_tiltedV_KWE_top_patch
48+
overland_tiltedV_KWE_top_patch_2
49+
overland_tiltedV_KWE_top_patch_3
50+
overland_slopingslab_DWE
51+
overland_tiltedV_DWE
52+
overland_FlatICP
53+
richards_FBx
54+
richards_FBy
55+
richards_box_proctest
56+
richards_box_proctest_vardz
57+
water_balance_y
58+
water_balance_x
59+
water_balance_x.hardflow.nojac
60+
water_balance_x.hardflow.jac
61+
channelwidth
62+
)
6163
endif()
6264

6365
if(${PARFLOW_HAVE_SILO})
64-
list(APPEND TESTS
65-
# indicator_field
66+
list(
67+
APPEND TESTS
68+
# indicator_field
6669
)
6770

68-
if(${PARFLOW_HAVE_HYPRE})
69-
list(APPEND TESTS
70-
# default_richards_with_silo
71-
)
72-
endif()
71+
if(${PARFLOW_HAVE_HYPRE})
72+
list(
73+
APPEND TESTS
74+
# default_richards_with_silo
75+
)
76+
endif()
7377
endif()
7478

7579
if(${PARFLOW_HAVE_NETCDF})
76-
list(APPEND TESTS
77-
indicator_field_netcdf
78-
)
79-
if(${PARFLOW_HAVE_HYPRE})
80-
#This test is failing on several platforms
81-
list(APPEND TESTS
82-
# default_richards_with_netcdf
83-
default_richards_restart_netcdf
80+
list(APPEND TESTS indicator_field_netcdf)
81+
if(${PARFLOW_HAVE_HYPRE})
82+
#This test is failing on several platforms
83+
list(
84+
APPEND TESTS
85+
# default_richards_with_netcdf
86+
default_richards_restart_netcdf
8487
)
85-
endif()
88+
endif()
8689
endif()
8790

8891
set(SAMRAI_TESTS)
8992
set(SAMRAI_TESTS_WITH_PATCH_COUNT)
9093

9194
if(${PARFLOW_HAVE_SAMRAI})
92-
list(APPEND SAMRAI_TESTS
93-
samrai_compute_domain)
95+
list(APPEND SAMRAI_TESTS samrai_compute_domain)
9496

95-
list(APPEND SAMRAI_TESTS_WITH_PATCH_COUNT
96-
samrai)
97+
list(APPEND SAMRAI_TESTS_WITH_PATCH_COUNT samrai)
9798
endif()
9899

99100
list(APPEND PARALLEL_3DTOPO_TESTS "")
100101
list(APPEND PARALLEL_2DTOPO_TESTS "")
101102

102-
if ( ${PARFLOW_AMPS_LAYER} IN_LIST PARFLOW_AMPS_LAYER_REQUIRE_MPI )
103-
list(APPEND PARALLEL_3DTOPO_TESTS
104-
default_single
105-
default_single_read_porosity
106-
)
107-
108-
if(${PARFLOW_HAVE_HYPRE})
109-
list(APPEND PARALLEL_3DTOPO_TESTS
110-
default_richards
111-
default_richards_restart)
103+
if(${PARFLOW_AMPS_LAYER} IN_LIST PARFLOW_AMPS_LAYER_REQUIRE_MPI)
104+
list(
105+
APPEND PARALLEL_3DTOPO_TESTS
106+
default_single
107+
default_single_read_porosity
108+
)
112109

113-
if(${PARFLOW_HAVE_NETCDF})
114-
list(APPEND PARALLEL_3DTOPO_TESTS
115-
default_richards_restart_netcdf)
116-
endif()
110+
if(${PARFLOW_HAVE_HYPRE})
111+
list(
112+
APPEND PARALLEL_3DTOPO_TESTS
113+
default_richards
114+
default_richards_restart
115+
)
117116

118-
list(APPEND PARALLEL_2DTOPO_TESTS
119-
default_overland
120-
default_overland.pfmg.jac
121-
default_overland.pfmg_octree.fulljac
122-
LW_var_dz
123-
LW_var_dz_spinup
124-
overland_slopingslab_KWE
125-
richards_box_proctest_vardz
126-
reservoir_mpi_test
127-
)
117+
if(${PARFLOW_HAVE_NETCDF})
118+
list(APPEND PARALLEL_3DTOPO_TESTS default_richards_restart_netcdf)
119+
endif()
120+
121+
list(
122+
APPEND PARALLEL_2DTOPO_TESTS
123+
default_overland
124+
default_overland.pfmg.jac
125+
default_overland.pfmg_octree.fulljac
126+
LW_var_dz
127+
LW_var_dz_spinup
128+
overland_slopingslab_KWE
129+
richards_box_proctest_vardz
130+
reservoir_mpi_test
131+
)
128132

129-
if(${PARFLOW_HAVE_SILO})
130-
list(APPEND PARALLEL_2DTOPO_TESTS
131-
default_overland.pfmg_octree.jac)
133+
if(${PARFLOW_HAVE_SILO})
134+
list(APPEND PARALLEL_2DTOPO_TESTS default_overland.pfmg_octree.jac)
135+
endif()
132136
endif()
133-
endif()
134-
135137
endif()
136138

137139
if(${PARFLOW_HAVE_OAS3})
138-
# Exclude tests that use Richards solver
139-
set(TESTS "")
140-
set(PARALLEL_3DTOPO_TESTS "")
141-
set(PARALLEL_2DTOPO_TESTS "")
142-
list(APPEND TESTS default_single)
140+
# Exclude tests that use Richards solver
141+
set(TESTS "")
142+
set(PARALLEL_3DTOPO_TESTS "")
143+
set(PARALLEL_2DTOPO_TESTS "")
144+
list(APPEND TESTS default_single)
143145
endif()
144146

145-
146147
foreach(inputfile ${TESTS})
147-
pf_add_py_test(${inputfile})
148+
pf_add_py_test(${inputfile})
148149
endforeach()
149150

150151
###################################################################
151152

152-
153153
foreach(inputfile ${PARALLEL_2DTOPO_TESTS})
154-
155-
pf_add_py_parallel_test(${inputfile} 1 2 1)
156-
pf_add_py_parallel_test(${inputfile} 2 1 1)
157-
pf_add_py_parallel_test(${inputfile} 1 4 1)
158-
pf_add_py_parallel_test(${inputfile} 4 1 1)
159-
154+
pf_add_py_parallel_test(${inputfile} 1 2 1)
155+
pf_add_py_parallel_test(${inputfile} 2 1 1)
156+
pf_add_py_parallel_test(${inputfile} 1 4 1)
157+
pf_add_py_parallel_test(${inputfile} 4 1 1)
160158
endforeach()
161159

162-
163160
foreach(inputfile ${PARALLEL_3DTOPO_TESTS})
164-
165-
pf_add_py_parallel_test(${inputfile} 1 1 2)
166-
pf_add_py_parallel_test(${inputfile} 1 2 1)
167-
pf_add_py_parallel_test(${inputfile} 2 1 1)
168-
pf_add_py_parallel_test(${inputfile} 1 1 4)
169-
pf_add_py_parallel_test(${inputfile} 1 4 1)
170-
pf_add_py_parallel_test(${inputfile} 4 1 1)
171-
pf_add_py_parallel_test(${inputfile} 2 2 2)
172-
if(NOT( ((${PARFLOW_HAVE_CUDA}) OR (${PARFLOW_HAVE_KOKKOS}) OR (${PARFLOW_HAVE_OMP})) ))
173-
pf_add_py_parallel_test(${inputfile} 3 3 3)
174-
endif()
175-
161+
pf_add_py_parallel_test(${inputfile} 1 1 2)
162+
pf_add_py_parallel_test(${inputfile} 1 2 1)
163+
pf_add_py_parallel_test(${inputfile} 2 1 1)
164+
pf_add_py_parallel_test(${inputfile} 1 1 4)
165+
pf_add_py_parallel_test(${inputfile} 1 4 1)
166+
pf_add_py_parallel_test(${inputfile} 4 1 1)
167+
pf_add_py_parallel_test(${inputfile} 2 2 2)
168+
if(
169+
NOT (
170+
(
171+
(${PARFLOW_HAVE_CUDA})
172+
OR (${PARFLOW_HAVE_KOKKOS})
173+
OR (${PARFLOW_HAVE_OMP})
174+
)
175+
)
176+
)
177+
pf_add_py_parallel_test(${inputfile} 3 3 3)
178+
endif()
176179
endforeach()
177180

178181
###################################################################
179182

180-
add_subdirectory (new_features)
183+
add_subdirectory(new_features)
181184
# add_subdirectory (scenarios)
182-
add_subdirectory (key_validation)
185+
add_subdirectory(key_validation)
183186

184-
if (${PARFLOW_HAVE_CLM})
185-
add_subdirectory (clm)
186-
add_subdirectory (washita)
187+
if(${PARFLOW_HAVE_CLM})
188+
add_subdirectory(clm)
189+
add_subdirectory(washita)
187190
endif(${PARFLOW_HAVE_CLM})

test/python/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ testclean:
5151
@rm -f *.etrace
5252
@rm -f Flow_Barrier_X.sa Flow_Barrier_Y.sa
5353
@rm -f stats4.txt
54-
@rm -fr test_output
54+
@rm -fr test_output dconf

0 commit comments

Comments
 (0)