You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2020/02/08 13:11:04 UTC

[celix] branch feature/query_command updated (707c5a9 -> 487248a)

This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a change to branch feature/query_command
in repository https://gitbox.apache.org/repos/asf/celix.git.


    from 707c5a9  gh-144: Fixes cmake configuration for osx
     add bd33f7c  gh-145: Refactors multi threading bundle handling in the framework.
     add 1304dfb  gh-145: Moves some handling of bundle state,stopping,starting & uinstall to framework
     add a821071  Fixes an issues when zip command is used instead of jar
     add 1e824f9  gh-145: Renames the framework tst folder to test.
     add 2486952  tries to fix test setup
     add 5ed4693  Merge pull request #147 from apache/feature/uninstall_bundle_issue
     new c837064  Merge branch 'develop' into feature/query_command
     new 487248a  Fixes framework.c

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 cmake/cmake_celix/BundlePackaging.cmake            |   7 +-
 libs/framework/CMakeLists.txt                      |   2 +-
 libs/framework/include/celix_bundle_context.h      |  22 +-
 libs/framework/include/celix_framework.h           |  58 ++
 libs/framework/private/mock/framework_mock.c       |  59 +-
 .../framework/private/test/bundle_context_test.cpp |  10 +-
 libs/framework/private/test/bundle_test.cpp        |  12 +-
 libs/framework/src/bundle.c                        |   6 +-
 libs/framework/src/bundle_context.c                |  72 +--
 libs/framework/src/framework.c                     | 627 ++++++++++++---------
 libs/framework/src/framework_private.h             |   8 +-
 libs/framework/{tst => test}/CMakeLists.txt        |   0
 .../{tst => test}/bundle_context_bundles_tests.cpp |  74 ++-
 .../{tst => test}/bundle_context_services_test.cpp |   0
 libs/framework/{tst => test}/config.properties.in  |   0
 libs/framework/{tst => test}/dm_tests.cpp          |   0
 .../{tst => test}/framework1.properties.in         |   0
 .../{tst => test}/framework2.properties.in         |   0
 .../{tst => test}/multiple_frameworks_test.cpp     |   0
 libs/framework/{tst => test}/nop_activator.c       |   0
 libs/framework/{tst => test}/run_tests.cpp         |   0
 .../{tst => test}/single_framework_test.cpp        |   0
 libs/framework/{tst => test}/subdir/CMakeLists.txt |   0
 libs/framework/{tst => test}/subdir/src/foo.c      |   0
 24 files changed, 566 insertions(+), 391 deletions(-)
 rename libs/framework/{tst => test}/CMakeLists.txt (100%)
 rename libs/framework/{tst => test}/bundle_context_bundles_tests.cpp (84%)
 rename libs/framework/{tst => test}/bundle_context_services_test.cpp (100%)
 rename libs/framework/{tst => test}/config.properties.in (100%)
 rename libs/framework/{tst => test}/dm_tests.cpp (100%)
 rename libs/framework/{tst => test}/framework1.properties.in (100%)
 rename libs/framework/{tst => test}/framework2.properties.in (100%)
 rename libs/framework/{tst => test}/multiple_frameworks_test.cpp (100%)
 rename libs/framework/{tst => test}/nop_activator.c (100%)
 rename libs/framework/{tst => test}/run_tests.cpp (100%)
 rename libs/framework/{tst => test}/single_framework_test.cpp (100%)
 rename libs/framework/{tst => test}/subdir/CMakeLists.txt (100%)
 rename libs/framework/{tst => test}/subdir/src/foo.c (100%)


[celix] 02/02: Fixes framework.c

Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/query_command
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 487248a35b6f68fe762c5b8ae1088795087ceea6
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sat Feb 8 14:09:39 2020 +0100

    Fixes framework.c
---
 libs/framework/src/framework.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c
index 6847897..c3aef4d 100644
--- a/libs/framework/src/framework.c
+++ b/libs/framework/src/framework.c
@@ -974,11 +974,11 @@ celix_status_t fw_startBundle(framework_pt framework, long bndId, int options __
                             if (createCalled) {
                                 destroy(activator->userData, context);
                             }
-                            bundle_setContext(bundle, NULL);
-                            bundle_setActivator(bundle, NULL);
+                            bundle_setContext(entry->bnd, NULL);
+                            bundle_setActivator(entry->bnd, NULL);
                             bundleContext_destroy(context);
                             free(activator);
-                            framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_RESOLVED);
+                            framework_setBundleStateAndNotify(framework, entry->bnd, OSGI_FRAMEWORK_BUNDLE_RESOLVED);
                         }
                     }
                 }


[celix] 01/02: Merge branch 'develop' into feature/query_command

Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/query_command
in repository https://gitbox.apache.org/repos/asf/celix.git

commit c83706418f9b26c3c7866f87f4916e34db11c31e
Merge: 707c5a9 5ed4693
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Sat Feb 8 14:07:23 2020 +0100

    Merge branch 'develop' into feature/query_command
    
    # Conflicts:
    #	libs/framework/src/framework.c
    #	libs/framework/test/bundle_context_bundles_tests.cpp

 cmake/cmake_celix/BundlePackaging.cmake            |   7 +-
 libs/framework/CMakeLists.txt                      |   2 +-
 libs/framework/include/celix_bundle_context.h      |  22 +-
 libs/framework/include/celix_framework.h           |  58 ++
 libs/framework/private/mock/framework_mock.c       |  59 +-
 .../framework/private/test/bundle_context_test.cpp |  10 +-
 libs/framework/private/test/bundle_test.cpp        |  12 +-
 libs/framework/src/bundle.c                        |   6 +-
 libs/framework/src/bundle_context.c                |  72 +--
 libs/framework/src/framework.c                     | 621 ++++++++++++---------
 libs/framework/src/framework_private.h             |   8 +-
 libs/framework/{tst => test}/CMakeLists.txt        |   0
 .../{tst => test}/bundle_context_bundles_tests.cpp |  74 ++-
 .../{tst => test}/bundle_context_services_test.cpp |   0
 libs/framework/{tst => test}/config.properties.in  |   0
 libs/framework/{tst => test}/dm_tests.cpp          |   0
 .../{tst => test}/framework1.properties.in         |   0
 .../{tst => test}/framework2.properties.in         |   0
 .../{tst => test}/multiple_frameworks_test.cpp     |   0
 libs/framework/{tst => test}/nop_activator.c       |   0
 libs/framework/{tst => test}/run_tests.cpp         |   0
 .../{tst => test}/single_framework_test.cpp        |   0
 libs/framework/{tst => test}/subdir/CMakeLists.txt |   0
 libs/framework/{tst => test}/subdir/src/foo.c      |   0
 24 files changed, 563 insertions(+), 388 deletions(-)

diff --cc libs/framework/test/bundle_context_bundles_tests.cpp
index 9f8794b,99ea18b..354ed79
--- a/libs/framework/test/bundle_context_bundles_tests.cpp
+++ b/libs/framework/test/bundle_context_bundles_tests.cpp
@@@ -379,39 -413,4 +413,39 @@@ TEST(CelixBundleContextBundlesTests, us
      std::cout << "use thread joined" << std::endl;
      uninstallThread.join();
      std::cout << "uninstall thread joined" << std::endl;
- };*/
 -};
++};
 +
 +TEST(CelixBundleContextBundlesTests, bundleInfoTests) {
 +    struct data {
 +        int provideCount{0};
 +        int requestedCount{0};
 +    };
 +    struct data data;
 +
 +    void (*updateCountFp)(void *, const celix_bundle_t*) = [](void *handle, const celix_bundle_t *bnd) {
 +        auto *data = static_cast<struct data*>(handle);
 +        auto *trackers = celix_bundle_listServiceTrackers(bnd);
 +        auto *services = celix_bundle_listRegisteredServices(bnd);
 +        data->requestedCount = celix_arrayList_size(trackers);
 +        data->provideCount = celix_arrayList_size(services);
 +        celix_bundle_destroyServiceTrackerList(trackers);
 +        celix_bundle_destroyRegisteredServicesList(services);
 +    };
 +
 +    bool called = celix_bundleContext_useBundle(ctx, 0, &data, updateCountFp);
 +    CHECK_TRUE(called);
 +    CHECK_EQUAL(0, data.provideCount);
 +    CHECK_EQUAL(0, data.requestedCount);
 +
 +
 +    long svcId = celix_bundleContext_registerService(ctx, (void*)0x42, "NopService", NULL);
 +    long trackerId = celix_bundleContext_trackServices(ctx, "AService", NULL, NULL, NULL);
 +
 +    called = celix_bundleContext_useBundle(ctx, 0, &data, updateCountFp);
 +    CHECK_TRUE(called);
 +    CHECK_EQUAL(1, data.provideCount);
 +    CHECK_EQUAL(1, data.requestedCount);
 +
 +    celix_bundleContext_unregisterService(ctx, svcId);
 +    celix_bundleContext_stopTracker(ctx, trackerId);
 +}