From a78e99142037c22218e7b122e4415ee3e1f943ed Mon Sep 17 00:00:00 2001 From: Stephan Rohmen Date: Tue, 21 Jul 2020 19:47:34 +0200 Subject: Tests: Cover Graphviz support for per-target dependency graph options Issue: #20928 --- .../RunCMake/Graphviz/default_options-check.cmake | 8 ++++++ ...raph_target_dependencies.dot.GraphicApplication | 26 +++++++++++++++++++ ...ph_target_dependers.dot.CompilerFlags.dependers | 30 ++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication create mode 100644 Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers diff --git a/Tests/RunCMake/Graphviz/default_options-check.cmake b/Tests/RunCMake/Graphviz/default_options-check.cmake index c9a7562..584e276 100644 --- a/Tests/RunCMake/Graphviz/default_options-check.cmake +++ b/Tests/RunCMake/Graphviz/default_options-check.cmake @@ -3,3 +3,11 @@ include(RunCMake) ensure_files_match( ${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_default_options.dot ${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot) + +ensure_files_match( + ${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication + ${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot.GraphicApplication) + +ensure_files_match( + ${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers + ${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot.CompilerFlags.dependers) diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication new file mode 100644 index 0000000..92fe609 --- /dev/null +++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication @@ -0,0 +1,26 @@ +digraph "GraphicApplication" { +node [ + fontsize = "12" +]; + "node6" [ label = "GraphicApplication", shape = egg ]; + "node2" [ label = "CoreLibrary", shape = octagon ]; + "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary + "node0" [ label = "CompilerFlags", shape = pentagon ]; + "node2" -> "node0" // CoreLibrary -> CompilerFlags + "node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ]; + "node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary + "node4" [ label = "SystemLibrary", shape = octagon ]; + "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary + "node2" [ label = "CoreLibrary", shape = octagon ]; + "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary + "node7" [ label = "GraphicLibrary", shape = doubleoctagon ]; + "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary + "node8" [ label = "\"-lm\"", shape = septagon ]; + "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm" + "node0" [ label = "CompilerFlags", shape = pentagon ]; + "node7" -> "node0" // GraphicLibrary -> CompilerFlags + "node2" [ label = "CoreLibrary", shape = octagon ]; + "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary + "node9" [ label = "GraphicLibraryObjects", shape = hexagon ]; + "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects +} diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers new file mode 100644 index 0000000..82a2efe --- /dev/null +++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers @@ -0,0 +1,30 @@ +digraph "CompilerFlags" { +node [ + fontsize = "12" +]; + "node0" [ label = "CompilerFlags", shape = pentagon ]; + "node2" [ label = "CoreLibrary", shape = octagon ]; + "node2" -> "node0" // CoreLibrary -> CompilerFlags + "node4" [ label = "SystemLibrary", shape = octagon ]; + "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary + "node2" [ label = "CoreLibrary", shape = octagon ]; + "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary + "node1" [ label = "ConsoleApplication", shape = egg ]; + "node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary + "node6" [ label = "GraphicApplication", shape = egg ]; + "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary + "node7" [ label = "GraphicLibrary", shape = doubleoctagon ]; + "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary + "node6" [ label = "GraphicApplication", shape = egg ]; + "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary + "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ]; + "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary + "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ]; + "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary + "node7" [ label = "GraphicLibrary", shape = doubleoctagon ]; + "node7" -> "node0" // GraphicLibrary -> CompilerFlags + "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ]; + "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags + "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ]; + "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags +} -- cgit v0.12