-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/build-core-plugins' into develop
* feature/build-core-plugins: (60 commits) [wip][heartbeat] doc: Remove difftext. [heartbeat] ping_*: Build message and module. [heartbeat] pong_*: Build message and module. [heartbeat] Improve message handling. [heartbeat] module: Generate UUID, add modules. [heartbeat] plugin: Touch ptrs, C+11 support. [heartbeat] test: Update units for messages. [heartbeat] src: Add skeleton for heartbeat plugin. [heartbeat] globals: Add definitions. [heartbeat] docs: Update bit of modules and implementation. [heartbeat] cmake: Update dependencies and sources. [core] test: Add mocks, notes and fixtures. [core] event_listener: More logging and checks. [core] event_emittable: Remove source. [core] event_emitter: More lambda use, logging and checking for listeners. [core] event_loop: Add debug msg about primary loop. [core] events: Fix typo, inlining and dropped virtual dtors. [core] tunnel: Update private data, event emission, and iterator funcs. [core] module_pool: Update test, private ctors & dtors. [core] module_designation: Stub out 'isLocal'. ...
- Loading branch information
Showing
123 changed files
with
4,801 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
# BasedOnStyle: Mozilla | ||
Language: Cpp | ||
AccessModifierOffset: -2 | ||
ConstructorInitializerIndentWidth: 4 | ||
AlignEscapedNewlinesLeft: false | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: All | ||
AlwaysBreakTemplateDeclarations: false | ||
AlwaysBreakBeforeMultilineStrings: false | ||
BreakBeforeBinaryOperators: false | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BinPackParameters: true | ||
ColumnLimit: 80 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
DerivePointerAlignment: true | ||
ExperimentalAutoDetectBinPacking: false | ||
IndentCaseLabels: true | ||
IndentWrappedFunctionNames: false | ||
IndentFunctionDeclarationAfterType: false | ||
MaxEmptyLinesToKeep: 1 | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
NamespaceIndentation: None | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakString: 1000 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 200 | ||
PointerAlignment: Left | ||
SpacesBeforeTrailingComments: 1 | ||
Cpp11BracedListStyle: false | ||
Standard: Cpp14 | ||
IndentWidth: 2 | ||
TabWidth: 4 | ||
UseTab: Never | ||
BreakBeforeBraces: Attach | ||
SpacesInParentheses: false | ||
SpacesInAngles: false | ||
SpaceInEmptyParentheses: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInContainerLiterals: true | ||
SpaceBeforeAssignmentOperators: true | ||
ContinuationIndentWidth: 4 | ||
CommentPragmas: '^ IWYU pragma:' | ||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, for_each ] | ||
SpaceBeforeParens: ControlStatements | ||
DisableFormat: false | ||
... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2014 Jacky Alciné <[email protected]> | ||
Copyright (c) 2010, 2011, 2012, 2013, 2014 Jacky Alciné <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
# Testing Wintermute | ||
# Testing Wintermute {#testing} | ||
|
||
All of the tests in Wintermute live under the `test` directory. The testing | ||
framework used for Wintermute is underlying QtTest to handle Qt-specific logic. | ||
Just invoke the `test` to build all of the tests and run the test suite (using | ||
CTest as the driver). | ||
Testing's an important part of Wintermute. It provides a level of insurance of | ||
contract upholding between classes and higher-level interactions and allows for | ||
rapid application development without too much concern for the breaking of | ||
existing software. The test harness used by Wintermute is [CxxTest][] and | ||
[CTest][] is used to drive the whole test suite (via `make test`). Coverage | ||
support is handled by `gcov` and memory checking is handled by `valgrind`. | ||
|
||
## Wintermute's Fixture Library {#testing-fixture-lib} | ||
|
||
Wintermute has a fixture library `wintermute-fixtures` that | ||
allows test developers to write more introspective actions into Wintermute and | ||
even take advantage of mock classes into Wintermute's operations that are | ||
typically, by design, closed off. In essence, the fixture library is a | ||
recompilation of the core Wintermute library with these additives, thus | ||
preventing the parallel installation of said libraries. | ||
|
||
### Available Fixtures {#testing-fixture-lib-fixtures} | ||
|
||
### Available Macros {#testing-fixture-lib-macros} | ||
|
||
### Available Functions {#testing-fixture-lib-functions} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Find zmq.hpp | ||
|
||
INCLUDE(FindPkgConfig) | ||
|
||
PKG_SEARCH_MODULE(ZMQ REQUIRED | ||
libzmq) | ||
|
||
set(ZEROMQCXX_LIBRARIES ${ZMQ_LIBRARIES}) | ||
set(ZEROMQCXX_INCLUDE_DIR /usr/include) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# vim: set ts=2 sts=2 sw=2 fdm=indent | ||
############################################################################### | ||
# Author: Jacky Alciné <[email protected]> | ||
# | ||
# Wintermute is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Library General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 3 of the License, or (at your option) any later version. | ||
# | ||
# Wintermute is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Library General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Library General Public | ||
# License along with Wintermute; if not, write to the | ||
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
# Boston, MA 02111-1307, USA. | ||
############################################################################### | ||
|
||
include(WintermuteSourceBuild | ||
OPTIONAL | ||
RESULT_VARIABLE WINTERMUTE_IS_SOURCE_BUILD | ||
) | ||
|
||
include(WintermuteTest) | ||
include(WintermuteVariables) | ||
|
||
MACRO(wintermute_plugin_declare) | ||
SET(options | ||
) | ||
SET(oneValueArgs | ||
NAME | ||
TARGET | ||
) | ||
SET(multiValueArgs | ||
) | ||
|
||
CMAKE_PARSE_ARGUMENTS(_wpd "${options}" | ||
"${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
||
wintermute_add_target_properties(${_wpd_TARGET}) | ||
target_link_libraries(${_wpd_TARGET} | ||
wintermute) | ||
|
||
set(_include_dirs ) | ||
set(_libs ) | ||
|
||
if (EXISTS ${WINTERMUTE_IS_SOURCE_BUILD}) | ||
set(_include_dirs | ||
${CMAKE_SOURCE_DIR}/src | ||
${CMAKE_BINARY_DIR}/src/wintermutecore | ||
) | ||
else() | ||
set(_include_dirs ${WINTERMUTE_INCLUDE_DIR}) | ||
endif() | ||
|
||
target_include_directories(${_wpd_TARGET} BEFORE | ||
PUBLIC ${_include_dirs}) | ||
ENDMACRO(wintermute_plugin_declare) | ||
|
||
# TODO: Configure the test driver source file to work for the provided Plugin. | ||
MACRO(wintermute_plugin_validate) | ||
SET(options | ||
) | ||
SET(oneValueArgs | ||
TARGET | ||
) | ||
SET(multiValueArgs | ||
) | ||
|
||
CMAKE_PARSE_ARGUMENTS(_wpv "${options}" | ||
"${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
||
SET(_plugin_driver_file | ||
"${CMAKE_CURRENT_BINARY_DIR}/${_wpv_TARGET}-validator.hh") | ||
SET(_test_driver_file ) | ||
|
||
IF (EXISTS ${WINTERMUTE_IS_SOURCE_BUILD}) | ||
SET(_test_driver_file "${CMAKE_SOURCE_DIR}/cmake/plugin_driver.hh.in") | ||
ELSE() | ||
ENDIF() | ||
|
||
GET_TARGET_PROPERTY(_wpv_file ${_wpv_TARGET} LOCATION) | ||
|
||
CONFIGURE_FILE(${_test_driver_file} | ||
${_plugin_driver_file} | ||
@ONLY) | ||
|
||
WINTERMUTE_ADD_TEST(plugin-verify ${_wpv_TARGET} ${_plugin_driver_file}) | ||
ENDMACRO(wintermute_plugin_validate) | ||
|
||
MACRO(wintermute_plugin_add_test) | ||
SET(options | ||
) | ||
SET(oneValueArgs | ||
PREFIX | ||
HEADER | ||
NAME | ||
TARGET | ||
) | ||
SET(multiValueArgs | ||
) | ||
|
||
CMAKE_PARSE_ARGUMENTS(_wpat "${options}" | ||
"${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
||
WINTERMUTE_ADD_TEST("plugin-${_wpat_PREFIX}" ${_wpat_NAME} ${_wpat_HEADER}) | ||
TARGET_LINK_LIBRARIES("plugin-${_wpat_PREFIX}-${_wpat_NAME}" | ||
${_wpat_TARGET}) | ||
ENDMACRO(wintermute_plugin_add_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.