From 26f8da440831bbd1d78e5b5426bfca911a873c4d Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Wed, 24 Jul 2019 13:32:32 +0200 Subject: [PATCH] Adjust to latest dune-testtools Which changed the interfacing between Python and CMake. --- cmake/modules/DuneCodegenMacros.cmake | 6 ++---- cmake/modules/GeneratedSystemtests.cmake | 14 ++++++++++---- cmake/modules/deplist.py | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/cmake/modules/DuneCodegenMacros.cmake b/cmake/modules/DuneCodegenMacros.cmake index 91e48d73..cff09c5e 100644 --- a/cmake/modules/DuneCodegenMacros.cmake +++ b/cmake/modules/DuneCodegenMacros.cmake @@ -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 diff --git a/cmake/modules/GeneratedSystemtests.cmake b/cmake/modules/GeneratedSystemtests.cmake index 87af7161..2a190795 100644 --- a/cmake/modules/GeneratedSystemtests.cmake +++ b/cmake/modules/GeneratedSystemtests.cmake @@ -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}) diff --git a/cmake/modules/deplist.py b/cmake/modules/deplist.py index 9cb5d7d4..7b0afac3 100755 --- a/cmake/modules/deplist.py +++ b/cmake/modules/deplist.py @@ -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) -- GitLab