From ac74ae2fff513cfc80b5257d8dbe99a7ccceffcd Mon Sep 17 00:00:00 2001 From: Ivan Krysak Date: Wed, 15 Jun 2022 14:44:56 +0300 Subject: [PATCH] Add the cfg generation test --- tests/runtime/RuntimeTests.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/runtime/RuntimeTests.cmake b/tests/runtime/RuntimeTests.cmake index 4d55a1ed8..a328028f7 100644 --- a/tests/runtime/RuntimeTests.cmake +++ b/tests/runtime/RuntimeTests.cmake @@ -92,3 +92,20 @@ macro(artifact_handler CATEGORY INPUT_FILE CONFIGURATION OUTPUT TARGET_NAME) endif() endmacro() register_derived_artifact("compiled" "assembly-html" ".yml" "FILE") + +macro(artifact_handler CATEGORY INPUT_FILE CONFIGURATION OUTPUT TARGET_NAME) + if("${CATEGORY}" STREQUAL "tests_runtime" AND NOT "${CONFIGURATION}" STREQUAL + "static_native") + set(COMMAND_TO_RUN + "./bin/revng" + pipeline + Lift:DetectABI:module.ll::Root + YieldCFG:cfg-svg.yml:*:FunctionControlFlowGraphSVG + -i + "begin:input:${INPUT_FILE}" + -o + "YieldCFG:cfg-svg.yml:${OUTPUT}") + set(DEPEND_ON revng-all-binaries) + endif() +endmacro() +register_derived_artifact("compiled" "cfg-svg" ".yml" "FILE")