Skip to content

Commit

Permalink
fix multiple graphs and allow debug check arguments (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
psycofdj committed Sep 1, 2017
1 parent 3aef3c1 commit 7044d63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/check/FindCheckRule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ endif()

set(CheckRule_FOUND 1)
set(CheckRule_DEFAULT_ARGS "" CACHE STRING "CheckRule default unit-test binary parameter template")
set(CheckRule_DEFAULT_DBG_ARGS "" CACHE STRING "CheckRule default unit-test binary parameter template when running gdb commands")
set(CheckRule_DEFAULT_ENV "" CACHE STRING "CheckRule default unit-test binary environment template")
set(CheckRule_DEFAULT_INCLUDES "" CACHE STRING "CheckRule default unit-test header includes")
set(CheckRule_DEFAULT_LINKS "" CACHE STRING "CheckRule default unit-test link libraries")
Expand Down Expand Up @@ -126,10 +127,14 @@ function(add_check module)
set(CheckRule_OUTPUT "${PROJECT_BINARY_DIR}/reports/check/${module}")

if (NOT CheckRule_NO_DEFAULT_ARGS)
xtdmake_eval(l_args "${CheckRule_DEFAULT_ARGS}")
xtdmake_eval(l_argsDbg "${CheckRule_DEFAULT_DBG_ARGS}")
xtdmake_eval(l_args "${CheckRule_DEFAULT_ARGS}")
foreach (c_arg ${l_args})
list(APPEND CheckRule_ARGS ${c_arg})
endforeach()
foreach (c_arg ${l_argsDbg})
list(APPEND CheckRule_DBG_ARGS ${c_arg})
endforeach()
endif()

if (NOT CheckRule_NO_DEFAULT_ENV)
Expand Down Expand Up @@ -185,7 +190,7 @@ function(add_check module)
COMMAND ${CheckRule_ENV} ./${c_name_clean} ${CheckRule_ARGS}
DEPENDS ${c_name_clean})
add_custom_target(${module}-check-ut-${c_name_clean}-gdb
COMMAND ${CheckRule_ENV} gdb -ex run --args ${c_name_clean} ${CheckRule_ARGS}
COMMAND ${CheckRule_ENV} gdb -ex run --args ${c_name_clean} ${CheckRule_ARGS} ${CheckRule_DBG_ARGS}
DEPENDS ${c_name_clean})
add_custom_target(${module}-check-ut-${c_name_clean}-cmd
COMMAND echo ${CheckRule_ENV} ${CMAKE_CURRENT_BINARY_DIR}/${c_name_clean} ${CheckRule_ARGS})
Expand Down
3 changes: 2 additions & 1 deletion src/interface/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@
var l_graphs = p_graphs[l_kpi][l_module];

self.lastModule = l_module;
self.ui.content.find("canvas").remove();
$.each(l_graphs, function(c_idx, c_graph) {
self.ui.content.find("canvas").remove();;
var l_context = $("<canvas/>");
self.ui.content.append(l_context);
var myChart = new Chart(l_context[0], c_graph);
l_context.click(function(p_event) {
Expand Down

0 comments on commit 7044d63

Please sign in to comment.