pnoltes commented on code in PR #473:
URL: https://github.com/apache/celix/pull/473#discussion_r1084393570
##
misc/error_injector/CMakeLists.txt:
##
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_library(error_injector INTERFACE error_injector.h)
Review Comment:
nitpick: IMO this library can be subdir of the libs directory and also has
as name `Celix::error_injector`
##
misc/error_injector/error_injector.h:
##
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#ifndef CELIX_ERROR_INJECTOR_H
+#define CELIX_ERROR_INJECTOR_H
Review Comment:
nitpick: please rename to celix_error_injector.h and move it to a include
dir.
##
misc/error_injector/celix_properties/CMakeLists.txt:
##
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_library(celix_properties_ei STATIC celix_properties_ei.cpp)
Review Comment:
nitpick: In Celix most resent C++ sources files use the `cc` extension
##
bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/CMakeLists.txt:
##
@@ -17,10 +17,16 @@
add_executable(celix_pswp_common_tests src/PS_WP_common_tests.cc)
target_include_directories(celix_pswp_common_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../src)
-target_link_libraries(celix_pswp_common_tests PRIVATE
celix_pubsub_protocol_lib GTest::gtest Celix::pubsub_spi GTest::gtest_main
${CMAKE_DL_LIBS})
-if (NOT ENABLE_ADDRESS_SANITIZER)
-target_compile_definitions(celix_pswp_common_tests PRIVATE
ENABLE_MALLOC_RETURN_NULL_TESTS)
-endif ()
+target_link_libraries(celix_pswp_common_tests PRIVATE
celix_pubsub_protocol_lib GTest::gtest Celix::pubsub_spi GTest::gtest_main)
add_test(NAME celix_pswp_common_tests COMMAND celix_pswp_common_tests)
-setup_target_for_coverage(celix_pswp_common_tests SCAN_DIR ..)
\ No newline at end of file
+setup_target_for_coverage(celix_pswp_common_tests SCAN_DIR ..)
+
+if (LINKER_WRAP_SUPPORTED)
Review Comment:
Nice. Yeah so only if wrap is supported this is used and this includes the
coverage build.
##
bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/src/PS_WP_common_ei_tests.cc:
##
@@ -0,0 +1,233 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements. See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership. The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicabl