diff --git a/.github/workflows/composite/unit-integration-test-runner/run-unit-tests.sh b/.github/workflows/composite/unit-integration-test-runner/run-unit-tests.sh index 69b03a4d..88027bb1 100755 --- a/.github/workflows/composite/unit-integration-test-runner/run-unit-tests.sh +++ b/.github/workflows/composite/unit-integration-test-runner/run-unit-tests.sh @@ -2,12 +2,6 @@ set -e if [ -d "/usr/lib/x86_64-linux-gnu/" ]; then -ls /usr/lib/x86_64-linux-gnu/libcrypto.* -echo "----" -nm -D /usr/lib/x86_64-linux-gnu/libcrypto.so -echo "----" -nm -D /usr/lib/x86_64-linux-gnu/libcrypto.so | grep EVP_DecryptFinal_ex -echo "----" export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH fi diff --git a/core/Makefile b/core/Makefile index ccd91315..c5e0a6b2 100644 --- a/core/Makefile +++ b/core/Makefile @@ -110,24 +110,26 @@ else endif # Path on GitHub Action Runner (ubuntu-latest image) ifeq ($(shell test -d "/usr/lib/x86_64-linux-gnu" && echo yes || echo no),yes) - CRYPTO_LIBS += -L/usr/lib/x86_64-linux-gnu + CRYPTO_LIBS += -L/usr/lib/x86_64-linux-gnu -Wl,-Bdynamic endif endif pbcc_crypto_unittest: $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) pbcc_crypto_unit_tests.c - gcc -o pbcc_crypto_unit_test.so -shared $(CFLAGS) $(LDFLAGS) $(CRYPTO_INCLUDES) $(CRYPTO_LIBS) -D PUBNUB_CRYPTO_API=1 -Wall $(COVERAGE_FLAGS) -fPIC $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) test/pubnub_test_mocks.c pbcc_crypto_unit_tests.c -lcgreen -lm + gcc -o pbcc_crypto_unit_test.so -shared -v $(CFLAGS) $(LDFLAGS) $(CRYPTO_INCLUDES) $(CRYPTO_LIBS) -D PUBNUB_CRYPTO_API=1 -Wall $(COVERAGE_FLAGS) -fPIC $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) test/pubnub_test_mocks.c pbcc_crypto_unit_tests.c -lcgreen -lm # gcc -o pubnub_core_unit_testo $(CFLAGS) -Wall $(COVERAGE_FLAGS) $(PROJECT_SOURCEFILES) pbcc_crypto_unit_tests.c -lcgreen -lm ldd pbcc_crypto_unit_test.so + readelf -s pbcc_crypto_unit_test.so | grep EVP_DecryptFinal_ex $(CGREEN_RUNNER) ./pbcc_crypto_unit_test.so #$(GCOVR) -r . --html --html-details -o coverage.html SUBSCRIBE_V2_SOURCEFILES += pubnub_subscribe_v2.c pbcc_subscribe_v2.c pubnub_crypto_unittest: $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) $(SUBSCRIBE_V2_SOURCEFILES) pubnub_crypto_unit_tests.c - gcc -o pubnub_crypto_unit_test.so -shared $(CFLAGS) $(LDFLAGS) $(CRYPTO_INCLUDES) $(CRYPTO_LIBS) -D PUBNUB_CRYPTO_API=1 -D PUBNUB_USE_SUBSCRIBE_V2=1 -Wall $(COVERAGE_FLAGS) -fPIC $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) $(SUBSCRIBE_V2_SOURCEFILES) test/pubnub_test_mocks.c pubnub_crypto_unit_tests.c -lcgreen -lm + gcc -o pubnub_crypto_unit_test.so -shared -v $(CFLAGS) $(LDFLAGS) $(CRYPTO_INCLUDES) $(CRYPTO_LIBS) -D PUBNUB_CRYPTO_API=1 -D PUBNUB_USE_SUBSCRIBE_V2=1 -Wall $(COVERAGE_FLAGS) -fPIC $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) $(SUBSCRIBE_V2_SOURCEFILES) test/pubnub_test_mocks.c pubnub_crypto_unit_tests.c -lcgreen -lm # gcc -o pubnub_core_unit_testo $(CFLAGS) -Wall $(COVERAGE_FLAGS) $(PROJECT_SOURCEFILES) pubnub_crypto_unit_tests.c -lcgreen -lm ldd pubnub_crypto_unit_test.so + readelf -s pubnub_crypto_unit_test.so | grep EVP_DecryptFinal_ex $(CGREEN_RUNNER) ./pubnub_crypto_unit_test.so