Mercurial > louis > mq > lightsd
changeset 459:c6515904f07f
Automated merge with ssh://lardossa.kalessin.fr/projs/lightsd/.hg/patches/
author | Louis Opter <kalessin@kalessin.fr> |
---|---|
date | Mon, 23 May 2016 01:29:51 -0700 |
parents | 309dc021f81c (current diff) 89ae4a498401 (diff) |
children | 6547b28d9983 |
files | add_make_release.patch |
diffstat | 2 files changed, 67 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/add_make_release.patch Mon May 16 00:01:52 2016 -0700 +++ b/add_make_release.patch Mon May 23 01:29:51 2016 -0700 @@ -54,7 +54,7 @@ ADD_SUBDIRECTORY(tests) ELSE () MESSAGE( -@@ -105,7 +108,14 @@ +@@ -105,9 +108,14 @@ ENDIF () IF (SPHINX_FOUND) @@ -62,13 +62,13 @@ ADD_SUBDIRECTORY(docs) +ELSE () + MESSAGE(STATUS "Shpinx wasn't found, docs generation disabled") -+ENDIF () -+ -+IF (CMAKE_BUILD_TYPE MATCHES RELEASE) -+ ADD_SUBDIRECTORY(dist) ENDIF () ++ADD_SUBDIRECTORY(dist) ++ INSTALL( + FILES COPYING README.rst docs/protocol.rst + DESTINATION share/doc/lightsd diff --git a/CMakeScripts/FindBsdTar.cmake b/CMakeScripts/FindBsdTar.cmake new file mode 100644 --- /dev/null
--- a/add_power_transition.patch Mon May 16 00:01:52 2016 -0700 +++ b/add_power_transition.patch Mon May 23 01:29:51 2016 -0700 @@ -1,5 +1,5 @@ # HG changeset patch -# Parent 3f479a4932f848032f3af1bcd58f91dc3b04e4f8 +# Parent f2d3c102353fd3d3ca1ab2a8a27d7961458a25a6 Add a transition argument to the power functions Unlike LIFX's implementation, lightsd will properly get the bulbs to @@ -1359,6 +1359,67 @@ ${CMAKE_CURRENT_BINARY_DIR}/../lifx ) +diff --git a/tests/core/effect/CMakeLists.txt b/tests/core/effect/CMakeLists.txt +new file mode 100644 +--- /dev/null ++++ b/tests/core/effect/CMakeLists.txt +@@ -0,0 +1,13 @@ ++INCLUDE_DIRECTORIES( ++ ${CMAKE_CURRENT_SOURCE_DIR} ++ ${CMAKE_CURRENT_BINARY_DIR} ++) ++ ++FUNCTION(ADD_EFFECT_TEST TEST_SOURCE) ++ ADD_TEST_FROM_C_SOURCES(${TEST_SOURCE} ${TIME_MONOTONIC_LIBRARY}) ++ENDFUNCTION() ++ ++FILE(GLOB TESTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "test_*.c") ++FOREACH(TEST ${TESTS}) ++ ADD_EFFECT_TEST(${TEST}) ++ENDFOREACH() +diff --git a/tests/core/effect/test_effect_start.c b/tests/core/effect/test_effect_start.c +new file mode 100644 +--- /dev/null ++++ b/tests/core/effect/test_effect_start.c +@@ -0,0 +1,38 @@ ++#include "core/effect.c" ++ ++#include "mock_log.h" ++#include "mock_timer.h" ++ ++union lgtd_effect_ctx TEST_EFFECT_CTX = { .as_uint = 0 }; ++ ++enum { ++ FINITE_WITHOUT_CALLBACK, // duration != 0 ++ FINITE_WITH_CALLBACK, ++ INSTANT, // duration == 0 ++ PERIODIC, // timer_ms != 0 ++ ONE_SHOT, // timer_ms == 0 ++} test_case = 0;; ++ ++static int test_apply_callback_call_count = 0; ++ ++static void ++test_apply_callback(const struct lgtd_effect *effect) ++{ ++ test_apply_callback_call_count++; ++} ++ ++ ++int ++main(void) ++{ ++ switch (test_case++) { ++ case FINITE_WITH_CALLBACK: ++ lgtd_effect_start( ++ "test", 420, NULL, 0, 0, test_apply_callback, TEST_EFFECT_CTX ++ ); ++ default: ++ break; ++ } ++ ++ return 0; ++} diff --git a/tests/core/jsonrpc/test_jsonrpc_batch.c b/tests/core/jsonrpc/test_jsonrpc_batch.c --- a/tests/core/jsonrpc/test_jsonrpc_batch.c +++ b/tests/core/jsonrpc/test_jsonrpc_batch.c