Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sanitizer CI job #703

Open
wants to merge 70 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
3ce2674
Add sanitizer CI job
sfodagain Mar 28, 2024
1a87c51
Add creds for sanitizer job
sfodagain Mar 28, 2024
408187f
Add permissions to CI job
sfodagain Mar 28, 2024
514efcb
Fix device defender cmake configs
sfodagain Mar 28, 2024
b3170b0
Fix target_link_libraries
sfodagain Mar 28, 2024
edec814
Check if sanitizer works
sfodagain Mar 29, 2024
030eb69
Revert leak check
sfodagain Apr 1, 2024
8172f67
Enable sanitizer for jobs
sfodagain Apr 1, 2024
9691b60
Verify sanitizer works
sfodagain Apr 1, 2024
1f5a388
Fix adding sanitizer in tests
sfodagain Apr 1, 2024
4fcc0dc
Fix sanitizer for tests
sfodagain Apr 1, 2024
d208305
Change building
sfodagain Apr 1, 2024
673b32f
Define builder variants
sfodagain Apr 1, 2024
1395a76
Fix typo
sfodagain Apr 1, 2024
1ca715c
Fix builder.json
sfodagain Apr 1, 2024
ce3c578
Enable sanitizer for all
sfodagain Apr 1, 2024
8f421ec
Fix typo
sfodagain Apr 2, 2024
aa3f06a
Fun with gg
sfodagain Apr 2, 2024
219304f
Fix target_link_library
sfodagain Apr 2, 2024
6420132
Install softhsm
sfodagain Apr 2, 2024
c6f2980
Remove test leak
sfodagain Apr 2, 2024
40080ac
Merge branch 'main' into add-sanitizer-ci-job
alfred2g Apr 2, 2024
279733d
Merge branch 'main' into add-sanitizer-ci-job
sfodagain Apr 16, 2024
7e73a5e
Merge branch 'main' into add-sanitizer-ci-job
sfodagain Apr 30, 2024
1ffefd5
Remove extra params in running samples
sfodagain Apr 30, 2024
5128e10
Capture and print
sfodagain Apr 30, 2024
91d09b7
fixup
sfodagain Apr 30, 2024
72b2582
Fix memory and data race issues
sfodagain May 1, 2024
d4468ba
Refactor jobs service test
sfodagain May 1, 2024
f5ca4b5
Remove mqtt3 client from comd utils
sfodagain May 2, 2024
7880f0d
Fix format
sfodagain May 2, 2024
0786500
Add wait
sfodagain May 2, 2024
56ff250
fixup
sfodagain May 2, 2024
99c9a6a
Use stderr
sfodagain May 2, 2024
91a6867
Use cmake_args in samples and tests
sfodagain May 2, 2024
4c9c41d
Try to remove lock
sfodagain May 2, 2024
510d644
Revert jobs service test
sfodagain May 3, 2024
600076b
Enable sanitizers for service tests
sfodagain May 3, 2024
54df04b
Merge branch 'main' into add-sanitizer-ci-job
bretambrose Jul 2, 2024
48331ee
Fix typo in cmake args
sfodagain Jul 10, 2024
20526fd
Use promises to sync fleet provisioning sample
sfodagain Jul 11, 2024
b6492d7
Use promises to sync mqtt5 fleet provisioning sample
sfodagain Jul 11, 2024
4c99816
Fix mqtt5 fleet provisioning sample
sfodagain Jul 11, 2024
fb2fa06
Refactor fleet provisioning sample
sfodagain Jul 11, 2024
c6d0d80
Fix token type
sfodagain Jul 11, 2024
7504338
fixup
sfodagain Jul 11, 2024
69e7aba
Refactor mqtt5 fleet provisioning sample
sfodagain Jul 11, 2024
3dd5dfb
Refactor fleet provisioning sample further
sfodagain Jul 12, 2024
67f2331
Refactor mqtt5 fleet provisioning sample further
sfodagain Jul 12, 2024
c9775a5
fixup
sfodagain Jul 12, 2024
5718ba2
Use promise for cert token
sfodagain Jul 12, 2024
5c2f543
Merge branch 'main' into add-sanitizer-ci-job
sfodagain Jul 12, 2024
66427a3
Merge branch 'main' into add-sanitizer-ci-job
sfodagain Sep 9, 2024
c9eca48
Append CMake flags for Linux only
sfodagain Sep 9, 2024
e435e33
Remove GG tests from sanitizer CI
sfodagain Sep 9, 2024
09c3b6c
Refactor fleet provisioning service test
sfodagain Sep 9, 2024
d49f5df
Fix fleet provisioning service test for mqtt5
sfodagain Sep 9, 2024
a7b2e7a
Add promise to secure tunnel sample
sfodagain Sep 9, 2024
116b838
Fix format
sfodagain Sep 9, 2024
4ac5dda
Set promise correctly
sfodagain Sep 9, 2024
f8fa05b
Fix naming
sfodagain Sep 9, 2024
b51f7f4
Merge branch 'main' into add-sanitizer-ci-job
sfodagain Dec 2, 2024
4378227
Merge branch 'main' into add-sanitizer-ci-job
sfodagain Dec 2, 2024
292580d
Remove cmake extra changes
sfodagain Dec 2, 2024
5695a3a
Simplify sample cmake config
sfodagain Dec 2, 2024
46b10ef
Add missing cmake include
sfodagain Dec 2, 2024
18eacfd
Fix all samples
sfodagain Dec 2, 2024
d27eeaf
Fix shadow cmake config
sfodagain Dec 2, 2024
5c9a172
Fix cmake in tests
sfodagain Dec 2, 2024
17ba96d
Unify style
sfodagain Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .builder/actions/build_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def run(self, env):
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'])
# append extra cmake configs
steps[-1].extend(cmd_args.cmake_extra)
if sys.platform == "linux" or sys.platform == "linux2":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like we're repeating the exact same loop 4 times here.

steps[-1].extend(env.config['cmake_args'])
steps.append(['cmake',
'--build', build_path,
'--config', 'RelWithDebInfo'])
Expand All @@ -84,6 +86,8 @@ def run(self, env):
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'])
# append extra cmake configs
steps[-1].extend(cmd_args.cmake_extra)
if sys.platform == "linux" or sys.platform == "linux2":
steps[-1].extend(env.config['cmake_args'])
steps.append(['cmake',
'--build', build_path,
'--config', 'RelWithDebInfo'])
Expand All @@ -97,6 +101,8 @@ def run(self, env):
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'])
# append extra cmake configs
steps[-1].extend(cmd_args.cmake_extra)
if sys.platform == "linux" or sys.platform == "linux2":
steps[-1].extend(env.config['cmake_args'])
steps.append(['cmake',
'--build', build_path,
'--config', 'RelWithDebInfo'])
Expand All @@ -108,6 +114,8 @@ def run(self, env):
f'-H{sample_path}',
f'-DCMAKE_PREFIX_PATH={env.install_dir}',
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'])
if sys.platform == "linux" or sys.platform == "linux2":
steps[-1].extend(env.config['cmake_args'])
steps.append(['cmake',
'--build', build_path,
'--config', 'RelWithDebInfo'])
Expand Down
231 changes: 231 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -747,3 +747,234 @@ jobs:
- name: Check for edits to code-generated files
run: |
./utils/check_codegen_edits.py

clang-sanitizers:
runs-on: ubuntu-22.04 # latest
continue-on-error: true # TODO temporary for debugging purpose
strategy:
fail-fast: false # TODO temporary for debugging purpose
matrix:
sanitizer-variants: ["tsan", "asan"]
permissions:
id-token: write # This is required for requesting the JWT
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
echo "Downloading source"
git clone --recursive https://github.com/aws/aws-iot-device-sdk-cpp-v2.git --branch ${{ env.HEAD_REF || github.ref_name }}
echo "Running builder"
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --variant ${{ matrix.sanitizer-variants }}
- name: Running samples in CI setup
run: |
python3 -m pip install boto3
sudo apt-get update -y
sudo apt-get install softhsm -y
softhsm2-util --version
- name: configure AWS credentials (Fleet provisioning)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_FLEET_PROVISIONING_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Fleet Provisioning service client test for MQTT311
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_fleet_provisioning.py --config-file test_cases/mqtt3_fleet_provisioning_cfg.json --thing-name-prefix Fleet_Thing_
- name: run Fleet Provisioning service client test for MQTT5
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_fleet_provisioning.py --config-file test_cases/mqtt5_fleet_provisioning_cfg.json --thing-name-prefix Fleet_Thing_
- name: run Fleet Provisioning with CSR service client test for MQTT311
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_fleet_provisioning.py --config-file test_cases/mqtt3_fleet_provisioning_with_csr_cfg.json --thing-name-prefix Fleet_Thing_
- name: run Fleet Provisioning with CSR service client test for MQTT5
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_fleet_provisioning.py --config-file test_cases/mqtt5_fleet_provisioning_with_csr_cfg.json --thing-name-prefix Fleet_Thing_
- name: configure AWS credentials (Jobs)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_JOBS_SERVICE_CLIENT_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run mqtt3 Jobs serviceTests
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_jobs_execution.py --config-file ${{ env.CI_SERVICE_TESTS_CFG_FOLDER }}/mqtt3_jobs_cfg.json
- name: run mqtt5 Jobs serviceTests
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_jobs_execution.py --config-file ${{ env.CI_SERVICE_TESTS_CFG_FOLDER }}/mqtt5_jobs_cfg.json
- name: configure AWS credentials (Shadow)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_SHADOW_SERVICE_CLIENT_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Shadow service client test for MQTT5
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_shadow_update.py --config-file test_cases/mqtt5_shadow_cfg.json
- name: run Shadow service client test for MQTT311
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_shadow_update.py --config-file test_cases/mqtt3_shadow_cfg.json
- name: run Named Shadow service client test for MQTT311
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_shadow_update.py --config-file test_cases/mqtt3_named_shadow_cfg.json
- name: run Named Shadow service client test for MQTT5
if: always()
working-directory: ./aws-iot-device-sdk-cpp-v2/servicetests
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-cpp-v2/utils
python3 ./test_cases/test_shadow_update.py --config-file test_cases/mqtt5_named_shadow_cfg.json
- name: configure AWS credentials (Connect and PubSub)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_PUBSUB_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Basic Connect sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_basic_connect_cfg.json
- name: run Websocket Connect sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_websocket_connect_cfg.json
- name: run MQTT3 PubSub sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
- name: run PKCS11 Connect sample
if: always()
run: |
mkdir -p /tmp/tokens
export SOFTHSM2_CONF=/tmp/softhsm2.conf
echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pkcs11_connect_cfg.json
- name: configure AWS credentials (MQTT5)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run MQTT5 PubSub sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json
- name: run MQTT5 Shared Subscription sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_shared_subscription_cfg.json
- name: configure AWS credentials (Jobs)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_JOBS_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Jobs sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_jobs_cfg.json
- name: run Mqtt5 Jobs sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_jobs_mqtt5_cfg.json
- name: configure AWS credentials (Cognito)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_COGNITO_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run CognitoConnect sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_cognito_connect_cfg.json
- name: configure AWS credentials (Custom Authorizer)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_CUSTOM_AUTHORIZER_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run CustomAuthorizerConnect sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_custom_authorizer_connect_cfg.json
- name: configure AWS credentials (Shadow)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_SHADOW_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Shadow sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_shadow_cfg.json
- name: run Mqtt5 Shadow sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_shadow_mqtt5_cfg.json
- name: configure AWS credentials (Fleet provisioning)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_FLEET_PROVISIONING_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Fleet Provisioning sample
if: always()
run: |
echo "Generating UUID for IoT thing"
Sample_UUID=$(python3 -c "import uuid; print (uuid.uuid4())")
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_fleet_provisioning_cfg.json --input_uuid ${Sample_UUID}
python3 ${{ env.CI_UTILS_FOLDER }}/delete_iot_thing_ci.py --thing_name "Fleet_Thing_${Sample_UUID}" --region "us-east-1"
- name: run Mqtt5 Fleet Provisioning sample
if: always()
run: |
echo "Generating UUID for IoT thing"
Sample_UUID=$(python3 -c "import uuid; print (uuid.uuid4())")
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_fleet_provisioning_mqtt5_cfg.json --input_uuid ${Sample_UUID}
python3 ${{ env.CI_UTILS_FOLDER }}/delete_iot_thing_ci.py --thing_name "Fleet_Thing_${Sample_UUID}" --region "us-east-1"
- name: configure AWS credentials (Secure tunneling)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_SECURE_TUNNEL }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
# Secure Tunneling has special requirements, so it uses a different Python file
- name: run Secure Tunneling sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_secure_tunnel_ci.py --sample_file "./aws-iot-device-sdk-cpp-v2/build/samples/secure_tunneling/secure_tunnel/secure-tunnel" --sample_region ${{ env.AWS_DEFAULT_REGION }}
- name: configure AWS credentials (X509)
if: always()
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_X509_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run X509 sample
if: always()
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_x509_connect_cfg.json
# TODO Add GG tests.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ else()
include(AwsFindPackage)
endif()

include(AwsSanitizers)

aws_use_package(aws-crt-cpp)

add_subdirectory(jobs)
Expand Down
12 changes: 12 additions & 0 deletions builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@
"build"
]
},
"tsan": {
"cmake_args": [
"-DENABLE_SANITIZERS=ON",
"-DSANITIZERS=thread"
]
},
"asan": {
"cmake_args": [
"-DENABLE_SANITIZERS=ON",
"-DSANITIZERS=address,undefined"
]
},
"build_gg_samples_only": {
"!build_steps": [
"build",
Expand Down
4 changes: 3 additions & 1 deletion devicedefender/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ if (BUILD_DEPS)
endif()
endif()

target_link_libraries(IotDeviceDefender-cpp IotDeviceCommon-cpp)
aws_add_sanitizers(IotDeviceDefender-cpp)

target_link_libraries(IotDeviceDefender-cpp PUBLIC IotDeviceCommon-cpp)

install(FILES ${AWS_IOTDEVICEDEFENDER_HEADERS} DESTINATION "include/aws/iotdevicedefender/" COMPONENT Development)

Expand Down
1 change: 1 addition & 0 deletions devicedefender/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ if (UNIX AND NOT APPLE)
add_net_test_case(Mqtt5DeviceDefenderCustomMetricSuccess)
add_net_test_case(Mqtt5DeviceDefenderCustomMetricFail)
generate_cpp_test_driver(${TEST_BINARY_NAME})
aws_add_sanitizers(${TEST_BINARY_NAME})
endif()
3 changes: 2 additions & 1 deletion discovery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ if (BUILD_DEPS)
endif()
endif()

target_link_libraries(Discovery-cpp ${DEP_AWS_LIBS})
aws_add_sanitizers(Discovery-cpp)
target_link_libraries(Discovery-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_DISCOVERY_HEADERS} DESTINATION "include/aws/discovery/" COMPONENT Development)

Expand Down
4 changes: 2 additions & 2 deletions eventstream_rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ if (NOT IS_SUBDIRECTORY_INCLUDE)
aws_use_package(aws-crt-cpp)
endif()


target_link_libraries(EventstreamRpc-cpp ${DEP_AWS_LIBS})
aws_add_sanitizers(EventstreamRpc-cpp)
target_link_libraries(EventstreamRpc-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_EVENTSTREAMRPC_HEADERS} DESTINATION "include/aws/eventstreamrpc/" COMPONENT Development)

Expand Down
1 change: 1 addition & 0 deletions eventstream_rpc/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ add_test_case(OperateWhileDisconnected)
#add_test_case(EchoOperation)
#add_test_case(StressTestClient)
generate_cpp_test_driver(${TEST_BINARY_NAME})
aws_add_sanitizers(${TEST_BINARY_NAME})
target_include_directories(${TEST_BINARY_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
6 changes: 3 additions & 3 deletions greengrass_ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if (WIN32)
endif()

add_library(GreengrassIpc-cpp ${AWS_GREENGRASSIPC_CPP_SRC})
target_link_libraries(GreengrassIpc-cpp EventstreamRpc-cpp)
target_link_libraries(GreengrassIpc-cpp PUBLIC EventstreamRpc-cpp)

set_target_properties(GreengrassIpc-cpp PROPERTIES LINKER_LANGUAGE CXX)

Expand Down Expand Up @@ -107,8 +107,8 @@ if (NOT IS_SUBDIRECTORY_INCLUDE)
aws_use_package(aws-crt-cpp)
endif()


target_link_libraries(GreengrassIpc-cpp ${DEP_AWS_LIBS})
aws_add_sanitizers(GreengrassIpc-cpp)
target_link_libraries(GreengrassIpc-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_GREENGRASSIPC_HEADERS} DESTINATION "include/aws/greengrass/" COMPONENT Development)

Expand Down
3 changes: 2 additions & 1 deletion identity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ if (BUILD_DEPS)
endif()
endif()

target_link_libraries(IotIdentity-cpp ${DEP_AWS_LIBS})
aws_add_sanitizers(IotIdentity-cpp)
target_link_libraries(IotIdentity-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_IOTIDENTITY_HEADERS} DESTINATION "include/aws/iotidentity/" COMPONENT Development)

Expand Down
4 changes: 3 additions & 1 deletion iotdevicecommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ if (BUILD_DEPS)
aws_use_package(aws-c-iot)
endif()

target_link_libraries(IotDeviceCommon-cpp ${DEP_AWS_LIBS})
aws_add_sanitizers(IotDeviceCommon-cpp)

target_link_libraries(IotDeviceCommon-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_IOTDEVICECOMMON_HEADERS} DESTINATION "include/aws/iotdevicecommon/" COMPONENT Development)

Expand Down
4 changes: 3 additions & 1 deletion jobs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ if (BUILD_DEPS)
endif()
endif()

target_link_libraries(IotJobs-cpp ${DEP_AWS_LIBS})
aws_add_sanitizers(IotJobs-cpp)

target_link_libraries(IotJobs-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_IOTJOBS_HEADERS} DESTINATION "include/aws/iotjobs/" COMPONENT Development)

Expand Down
Loading
Loading