forked from aws/aws-iot-device-sdk-embedded-C
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
66 lines (53 loc) · 1.81 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
language: c
# Get Coverity certificate.
before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
# Coverity configuration.
addons:
coverity_scan:
project:
name: "aws-iot-device-sdk-embedded-C"
description: "SDK for connecting to AWS IoT from a device using embedded C. "
notification_email: [email protected]
build_command_prepend: "cd tests/integration"
build_command: "make app"
branch_pattern: master
install:
# Remove placeholders.
- rm external_libs/CppUTest/*
- rm -rf external_libs/mbedTLS
# Get mbedtls.
- git clone https://github.com/ARMmbed/mbedtls.git external_libs/mbedTLS
# Get CppUTest.
- wget -qO- https://github.com/cpputest/cpputest/archive/v3.6.tar.gz | tar xvz -C external_libs/CppUTest --strip-components=1
script:
# Verify that the samples build.
- cd samples/linux/jobs_sample
- make
- cd ../shadow_sample
- make
- cd ../shadow_sample_console_echo
- make
- cd ../subscribe_publish_library_sample
- make
- cd ../subscribe_publish_sample
- make
# Set the AWS IoT endpoint.
- cd ../../../tests/integration
- sed -i 's/^.*#define AWS_IOT_MQTT_HOST.*$/#define AWS_IOT_MQTT_HOST "'"$INTEGRATION_TEST_ENDPOINT"'"/' include/aws_iot_config.h
# Build the integration tests.
- make app
# Build the unit tests.
- cd ../../
- make build-cpputest
- make all_no_tests
# Execute unit tests.
- ./IotSdkC_tests
# Import credentials.
- echo -e $INTEGRATION_TEST_CLIENT_CERT > certs/cert.pem
- echo -e $INTEGRATION_TEST_ROOT_CA > certs/rootCA.crt
- echo -e $INTEGRATION_TEST_PRIVATE_KEY > certs/privkey.pem
# Execute integration tests.
- cd tests/integration
- ./integration_tests_mbedtls
- ./integration_tests_mbedtls_mt