Skip to content

Commit

Permalink
Merge pull request #6348 from wthrowe/python_test_timeouts
Browse files Browse the repository at this point in the history
Correctly set timeouts for various python tests
  • Loading branch information
nilsvu authored Oct 22, 2024
2 parents e88482f + b993ba9 commit 0dc5824
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 107 deletions.
9 changes: 1 addition & 8 deletions tests/Unit/IO/H5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,9 @@ spectre_add_python_bindings_test(
"Test_CombineH5.py"
"unit;IO;H5;Python"
PyH5
TIMEOUT 10
)

if(${BUILD_PYTHON_BINDINGS})
set_tests_properties(
"Unit.IO.H5.CombineH5.Python"
PROPERTIES
TIMEOUT 10
)
endif()

spectre_add_python_bindings_test(
"Unit.IO.H5.Python"
"Test_H5.py"
Expand Down
96 changes: 22 additions & 74 deletions tests/Unit/Visualization/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,116 +17,71 @@ spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotAlongLine"
Test_PlotAlongLine.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotCce"
Test_PlotCce.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotControlSystem"
Test_PlotControlSystem.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotDatFile"
Test_PlotDatFile.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotEllipticConvergence"
Test_PlotEllipticConvergence.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotMemoryMonitors"
Test_PlotMemoryMonitors.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotPowerMonitors"
Test_PlotPowerMonitors.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotSizeControl"
Test_PlotSizeControl.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotSlice"
Test_PlotSlice.py
"unit;visualization;python"
None)
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.PlotTrajectories"
Test_PlotTrajectories.py
"unit;visualization;python"
None)

if(${BUILD_PYTHON_BINDINGS})
# Test is a bit slow because it writes a bunch of plot files to verify
# the argument handling works.
set_tests_properties(
"Unit.Visualization.Python.PlotAlongLine"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotCce"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotControlSystem"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotDatFile"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotEllipticConvergence"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotMemoryMonitors"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotPowerMonitors"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotSizeControl"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotSlice"
PROPERTIES
TIMEOUT 10
)
set_tests_properties(
"Unit.Visualization.Python.PlotTrajectories"
PROPERTIES
TIMEOUT 10
)
endif()
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.ReadH5"
Expand All @@ -144,15 +99,8 @@ spectre_add_python_bindings_test(
"Unit.Visualization.Python.Render1D"
Test_Render1D.py
"unit;visualization;python"
None)

if(${BUILD_PYTHON_BINDINGS})
set_tests_properties(
"Unit.Visualization.Python.Render1D"
PROPERTIES
TIMEOUT 10
)
endif()
None
TIMEOUT 10)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.InterpolateToMesh"
Expand Down
19 changes: 4 additions & 15 deletions tests/Unit/Visualization/Python/Render3D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,12 @@ spectre_add_python_bindings_test(
"Unit.Visualization.Python.Render3D.Clip"
Test_Clip.py
"unit;visualization;python;paraview"
None)
None
TIMEOUT 30)

spectre_add_python_bindings_test(
"Unit.Visualization.Python.Render3D.Domain"
Test_Domain.py
"unit;visualization;python;paraview"
None)

if (BUILD_PYTHON_BINDINGS)
set_tests_properties(
"Unit.Visualization.Python.Render3D.Clip"
PROPERTIES
TIMEOUT 30
)
set_tests_properties(
"Unit.Visualization.Python.Render3D.Domain"
PROPERTIES
TIMEOUT 30
)
endif()
None
TIMEOUT 30)
12 changes: 2 additions & 10 deletions tests/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,5 @@ spectre_add_python_bindings_test(
"tools.ValidateInputFile"
Test_ValidateInputFile.py
"Python"
None)

if(${BUILD_PYTHON_BINDINGS})
# Test is a bit slow because it runs an executable
set_tests_properties(
"tools.ValidateInputFile"
PROPERTIES
TIMEOUT 30
)
endif()
None
TIMEOUT 30)

0 comments on commit 0dc5824

Please sign in to comment.