Skip to content
Snippets Groups Projects
Commit 759c2432 authored by Steffen Müthing's avatar Steffen Müthing
Browse files

[!342] Adjust to latest dune-testtools

Merge branch 'feature/latest-dune-testtools' into 'master'

ref:extensions/dune-codegen Which changed the interfacing between Python and
CMake.

See merge request [extensions/dune-codegen!342]

  [extensions/dune-codegen!342]: gitlab.dune-project.org/extensions/dune-codegen/merge_requests/342
parents 68893fc1 26f8da44
No related branches found
No related tags found
No related merge requests found
......@@ -178,10 +178,8 @@ function(dune_add_generated_executable)
endif()
# Parse a mapping of operators to build and their respective filenames
dune_execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env python ${dune-codegen_path}/deplist.py ${GEN_INIFILE} ${GEN_TARGET}
OUTPUT_VARIABLE depdata
)
parse_python_data(PREFIX depdata INPUT ${depdata})
dune_execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env python ${dune-codegen_path}/deplist.py ${GEN_INIFILE} ${GEN_TARGET} ${CMAKE_CURRENT_BINARY_DIR}/interface.log)
parse_python_data(PREFIX depdata FILE ${CMAKE_CURRENT_BINARY_DIR}/interface.log)
if(DUNE_CODEGEN_PROFILING)
# This is a bit silly, but cProfile only finds entry point scripts
......
......@@ -119,9 +119,14 @@ function(dune_add_formcompiler_system_test)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${SYSTEMTEST_INIFILE} ${CMAKE_CURRENT_BINARY_DIR}/tmp_${SYSTEMTEST_INIFILE})
# expand the given meta ini file into the build tree
execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env dune_expand_metaini.py --cmake --ini ${CMAKE_CURRENT_SOURCE_DIR}/${SYSTEMTEST_INIFILE} --dir ${CMAKE_CURRENT_BINARY_DIR} --section formcompiler
OUTPUT_VARIABLE output)
parse_python_data(PREFIX INIINFO INPUT "${output}")
execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env dune_expand_metaini.py
--cmake
--ini ${CMAKE_CURRENT_SOURCE_DIR}/${SYSTEMTEST_INIFILE}
--dir ${CMAKE_CURRENT_BINARY_DIR}
--section formcompiler
--file ${CMAKE_CURRENT_BINARY_DIR}/interface.log
)
parse_python_data(PREFIX INIINFO FILE ${CMAKE_CURRENT_BINARY_DIR}/interface.log)
foreach(inifile ${INIINFO_names})
if(${INIINFO_${inifile}_suffix} STREQUAL "__empty")
......@@ -147,10 +152,11 @@ function(dune_add_formcompiler_system_test)
# just the way that dune-testtools does.
dune_execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env dune_extract_static.py
--ini ${inifile}
--file ${CMAKE_CURRENT_BINARY_DIR}/interface.log
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
OUTPUT_VARIABLE output
ERROR_MESSAGE "Error extracting static info from ${inifile}")
parse_python_data(PREFIX STAT INPUT "${output}")
parse_python_data(PREFIX STAT FILE ${CMAKE_CURRENT_BINARY_DIR}/interface.log)
foreach(config ${STAT___CONFIGS})
foreach(cd ${STAT___STATIC_DATA})
......
......@@ -22,5 +22,5 @@ def get_filename(operator):
result = {"__{}".format(o): get_filename(o) for o in operators}
result["__operators"] = ";".join(operators)
printForCMake(result)
printForCMake(result, sys.argv[3])
sys.exit(0)
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