Skip to content
Snippets Groups Projects
Verified Commit a7c77562 authored by Lars Bilke's avatar Lars Bilke
Browse files

[T,nb] Remove cell timeout on notebook execution via testrunner.

Did more harm than good, overall timeouts are still handled by ctest
and pipeline.
parent 0a0dd6c9
No related branches found
No related tags found
No related merge requests found
...@@ -71,9 +71,6 @@ parser.add_argument( ...@@ -71,9 +71,6 @@ parser.add_argument(
"--hugo", action="store_true", help="Convert successful notebooks to web site." "--hugo", action="store_true", help="Convert successful notebooks to web site."
) )
parser.add_argument("--hugo-out", default="web", help="Hugo output directory.") parser.add_argument("--hugo-out", default="web", help="Hugo output directory.")
parser.add_argument(
"--timeout", default="600", type=int, help="Cell execution timeout."
)
args = parser.parse_args() args = parser.parse_args()
# Path setup # Path setup
...@@ -101,7 +98,7 @@ for notebook_file_path in args.notebooks: ...@@ -101,7 +98,7 @@ for notebook_file_path in args.notebooks:
with open(notebook_file_path, mode="r", encoding="utf-8") as f: with open(notebook_file_path, mode="r", encoding="utf-8") as f:
nb = nbformat.read(f, as_version=4) nb = nbformat.read(f, as_version=4)
ep = ExecutePreprocessor(timeout=args.timeout, kernel_name="python3") ep = ExecutePreprocessor(kernel_name="python3")
# 1. Run the notebook # 1. Run the notebook
notebook_filename = os.path.basename(notebook_file_path) notebook_filename = os.path.basename(notebook_file_path)
......
...@@ -11,7 +11,7 @@ test notebooks via wheel: ...@@ -11,7 +11,7 @@ test notebooks via wheel:
# TODO: # TODO:
# - better timeout # - better timeout
# - run in parallel # - run in parallel
- find . -type f -iname '*.ipynb' | grep -vP '\.ipynb_checkpoints|\.ci-skip.ipynb$|_out|.venv|PhaseField' | xargs xvfb-run -a python Notebooks/testrunner.py --out _out --timeout 1200 - find . -type f -iname '*.ipynb' | grep -vP '\.ipynb_checkpoints|\.ci-skip.ipynb$|_out|.venv|PhaseField' | xargs xvfb-run -a python Notebooks/testrunner.py --out _out
artifacts: artifacts:
when: always when: always
paths: paths:
......
...@@ -54,10 +54,7 @@ function(NotebookTest) ...@@ -54,10 +54,7 @@ function(NotebookTest)
) )
endif() endif()
set(timeout ${ogs.ctest.large_runtime}) if(NOT DEFINED NotebookTest_RUNTIME)
if(DEFINED NotebookTest_RUNTIME)
math(EXPR timeout "${NotebookTest_RUNTIME} * 10")
else()
set(NotebookTest_RUNTIME 1) set(NotebookTest_RUNTIME 1)
endif() endif()
...@@ -79,9 +76,7 @@ function(NotebookTest) ...@@ -79,9 +76,7 @@ function(NotebookTest)
set(TEST_NAME "nb-${NotebookTest_DIR}/${NotebookTest_NAME_WE}") set(TEST_NAME "nb-${NotebookTest_DIR}/${NotebookTest_NAME_WE}")
set(_exe_args Notebooks/testrunner.py --hugo --out ${Data_BINARY_DIR} set(_exe_args Notebooks/testrunner.py --hugo --out ${Data_BINARY_DIR})
--timeout ${timeout}
)
if(DEFINED ENV{CI}) if(DEFINED ENV{CI})
list(APPEND _exe_args --hugo-out ${PROJECT_BINARY_DIR}/web) list(APPEND _exe_args --hugo-out ${PROJECT_BINARY_DIR}/web)
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment