CELIX-237: Added extra test
Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/6494ec29 Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/6494ec29 Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/6494ec29 Branch: refs/heads/develop Commit: 6494ec29b61df6e69cd3608eadc841ab0292e96c Parents: 119bb95 Author: Pepijn Noltes <pepijnnol...@gmail.com> Authored: Mon Oct 12 12:04:36 2015 +0200 Committer: Pepijn Noltes <pepijnnol...@gmail.com> Committed: Mon Oct 12 12:04:36 2015 +0200 ---------------------------------------------------------------------- launcher/private/src/main.c | 9 ++++++++- .../dynamic_function_interface_tst/dyn_type_tests.cpp | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/6494ec29/launcher/private/src/main.c ---------------------------------------------------------------------- diff --git a/launcher/private/src/main.c b/launcher/private/src/main.c index ec72d03..8998e44 100644 --- a/launcher/private/src/main.c +++ b/launcher/private/src/main.c @@ -32,6 +32,7 @@ static void show_usage(char* prog_name); static void shutdown_framework(int signal); +static void ignore(int signal); #define DEFAULT_CONFIG_FILE "config.properties" @@ -62,6 +63,8 @@ int main(int argc, char *argv[]) { // Set signal handler (void) signal(SIGINT, shutdown_framework); + (void) signal(SIGUSR1, ignore); + (void) signal(SIGUSR2, ignore); int rc = celixLauncher_launch(config_file, &framework); if (rc == 0) { @@ -78,4 +81,8 @@ static void shutdown_framework(int signal) { if (framework != NULL) { celixLauncher_stop(framework); //NOTE main thread will destroy } -} \ No newline at end of file +} + +static void ignore(int signal) { + //ignoring for signal SIGUSR1, SIGUSR2. Can be used on threads +} http://git-wip-us.apache.org/repos/asf/celix/blob/6494ec29/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp ---------------------------------------------------------------------- diff --git a/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp b/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp index 57db391..e2fe950 100644 --- a/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp +++ b/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp @@ -5,7 +5,6 @@ #include "CppUTest/CommandLineTestRunner.h" extern "C" { - #include <string.h> #include <stdarg.h> #include "dyn_common.h" @@ -44,7 +43,7 @@ extern "C" { } FILE *stream = fopen("/dev/null", "w"); - dynType_print(type, stream); + dynType_print(type, stdout); fclose(stream); dynType_destroy(type); //printf("--\n\n"); @@ -72,6 +71,7 @@ TEST_GROUP(DynTypeTests) { #define EX13 "Ttype={DDDDD a b c d e};{ltype;Ltype;ltype;Ltype; byVal1 byRef1 byVal2 ByRef2}" #define EX14 "{DD{FF{JJ}{II*{ss}}}}" //unnamed fields #define EX15 "Tsample={jDD time val1 val2};Tresult={jDlsample; time result sample};Lresult;" +#define EX16 "Tpoi={BDD id lat lon};Lpoi;" #define CREATE_EXAMPLES_TEST(DESC) \ TEST(DynTypeTests, ParseTestExample ## DESC) { \ @@ -93,6 +93,7 @@ CREATE_EXAMPLES_TEST(EX12) CREATE_EXAMPLES_TEST(EX13) CREATE_EXAMPLES_TEST(EX14) CREATE_EXAMPLES_TEST(EX15) +CREATE_EXAMPLES_TEST(EX16) TEST(DynTypeTests, ParseRandomGarbageTest) { /*