Skip to content
Snippets Groups Projects
Commit 26f8da44 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Adjust to latest dune-testtools

Which changed the interfacing between Python and CMake.
parent db22f46d
No related branches found
No related tags found
No related merge requests found
...@@ -178,10 +178,8 @@ function(dune_add_generated_executable) ...@@ -178,10 +178,8 @@ function(dune_add_generated_executable)
endif() endif()
# Parse a mapping of operators to build and their respective filenames # 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} 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)
OUTPUT_VARIABLE depdata parse_python_data(PREFIX depdata FILE ${CMAKE_CURRENT_BINARY_DIR}/interface.log)
)
parse_python_data(PREFIX depdata INPUT ${depdata})
if(DUNE_CODEGEN_PROFILING) if(DUNE_CODEGEN_PROFILING)
# This is a bit silly, but cProfile only finds entry point scripts # This is a bit silly, but cProfile only finds entry point scripts
......
...@@ -119,9 +119,14 @@ function(dune_add_formcompiler_system_test) ...@@ -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}) 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 # 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 execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env dune_expand_metaini.py
OUTPUT_VARIABLE output) --cmake
parse_python_data(PREFIX INIINFO INPUT "${output}") --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}) foreach(inifile ${INIINFO_names})
if(${INIINFO_${inifile}_suffix} STREQUAL "__empty") if(${INIINFO_${inifile}_suffix} STREQUAL "__empty")
...@@ -147,10 +152,11 @@ function(dune_add_formcompiler_system_test) ...@@ -147,10 +152,11 @@ function(dune_add_formcompiler_system_test)
# just the way that dune-testtools does. # just the way that dune-testtools does.
dune_execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env dune_extract_static.py dune_execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env dune_extract_static.py
--ini ${inifile} --ini ${inifile}
--file ${CMAKE_CURRENT_BINARY_DIR}/interface.log
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
OUTPUT_VARIABLE output OUTPUT_VARIABLE output
ERROR_MESSAGE "Error extracting static info from ${inifile}") 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(config ${STAT___CONFIGS})
foreach(cd ${STAT___STATIC_DATA}) foreach(cd ${STAT___STATIC_DATA})
......
...@@ -22,5 +22,5 @@ def get_filename(operator): ...@@ -22,5 +22,5 @@ def get_filename(operator):
result = {"__{}".format(o): get_filename(o) for o in operators} result = {"__{}".format(o): get_filename(o) for o in operators}
result["__operators"] = ";".join(operators) result["__operators"] = ";".join(operators)
printForCMake(result) printForCMake(result, sys.argv[3])
sys.exit(0) 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