Skip to content
Snippets Groups Projects
Commit 06251c63 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

new CMake target manualtest

parent c01f8534
No related branches found
No related tags found
1 merge request!901Modernize some fit examples; new make target "manualtest"; cleanup in ISimulation context
......@@ -27,4 +27,3 @@ if __name__ == '__main__':
print(result.params.pretty_print())
print(lmfit.fit_report(result))
plt.show()
......@@ -7,6 +7,7 @@ file(MAKE_DIRECTORY ${TEST_OUTPUT_DIR_PY_PERSIST})
set(FIG_DIR ${CMAKE_SOURCE_DIR}/hugo/static/img)
add_custom_target(figures)
add_custom_target(manualtest)
file(MAKE_DIRECTORY ${FIG_DIR}/auto)
foreach(subdir scatter2d ff fq specular varia)
......@@ -51,6 +52,17 @@ function(run_plotless example)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endfunction()
# Run examples that don't plot.
function(run_manually example)
parse_example(${example})
add_custom_target(Manual.${EXAMPLE_NAME}.run
COMMAND ${CMAKE_COMMAND} -E env
PYTHONPATH=${CMAKE_BINARY_DIR}/lib
${Python3_EXECUTABLE} ${EXAMPLE_SCRIPT}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_dependencies(manualtest Manual.${EXAMPLE_NAME}.run)
endfunction()
# Python equality test: run modified example, and compare with reference data of another example
function(test_equality example reference tolerance)
parse_example(${example})
......@@ -183,3 +195,5 @@ run_example(varia/MaterialProfile)
run_example(varia/MaterialProfileWithParticles)
run_plotless(fit/algo/fit_rosenbrock)
run_plotless(fit54_ExternalMinimizer/lmfit_basics)
run_manually(fit54_ExternalMinimizer/lmfit_with_plotting)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment