Skip to content

Commit a1d9695

Browse files
authored
Merge pull request #2 from ARMmbed/master
Sync to latest mbed-os
2 parents 90c1f89 + b3583f0 commit a1d9695

File tree

1,483 files changed

+105956
-70241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,483 files changed

+105956
-70241
lines changed

.mergify.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pull_request_rules:
3939
conditions:
4040
# Travis failing
4141
- status-failure~=continuous-integration/travis-ci/pr
42+
- "label!=mergify skip"
4243
actions:
4344
label:
4445
add: ['needs: work']
@@ -49,6 +50,7 @@ pull_request_rules:
4950
conditions:
5051
# Jenkins CI failing
5152
- status-failure~=continuous-integration/jenkins/pr-head
53+
- "label!=mergify skip"
5254
actions:
5355
label:
5456
add: ['needs: work']
@@ -59,6 +61,7 @@ pull_request_rules:
5961
conditions:
6062
# Jenkins CI failing - any of the pipeline
6163
- status-failure~=^jenkins-ci
64+
- "label!=mergify skip"
6265
actions:
6366
label:
6467
add: ['needs: work']
@@ -74,6 +77,9 @@ pull_request_rules:
7477
- "#changes-requested-reviews-by=0"
7578
- "#approved-reviews-by>=1"
7679

80+
# No conflict with the base branch
81+
- -conflict
82+
7783
# CI green policy, at least Travis should be green
7884
- status-success~=continuous-integration/travis-ci/pr
7985
# new CI needs to be done (neutral does not work, lets check if it failed or passed, if none, we need to run again)
@@ -117,6 +123,7 @@ pull_request_rules:
117123
conditions:
118124
# Labels
119125
- "label!=do not merge"
126+
- "label!=mergify skip"
120127
- "label=needs: CI"
121128

122129
# Reviewers

.travis.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,41 @@ matrix:
5555
- <<: *basic-vm
5656
name: "license check"
5757
env: NAME=licence_check
58+
language: python
59+
python: 3.6.8 # scancode-toolkit v3.1.1 requires v3.6.8
60+
install:
61+
- pip install scancode-toolkit==3.1.1
62+
before_script:
63+
- mkdir -p SCANCODE
64+
# Fetch remaining information needed for branch comparison
65+
- git fetch --all --unshallow --tags
66+
- git fetch origin "${TRAVIS_BRANCH}"
5867
script:
68+
# scancode does not support list of files, only one file or directory
69+
# we use SCANCODE directory for all changed files (their copies with full tree)
70+
- >-
71+
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
72+
| ( grep '.\(c\|cpp\|h\|hpp\|py\)$' || true ) \
73+
| ( grep -v '^tools/test/toolchains/api_test.py' || true ) \
74+
| while read file; do cp --parents "${file}" SCANCODE; done
75+
- scancode -l --json-pp scancode.json SCANCODE
76+
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json || true
77+
after_success:
78+
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json
79+
- cat scancode-evaluate.log
80+
- COUNT=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
5981
- |
60-
! grep --recursive --max-count=100 --ignore-case --exclude .travis.yml \
61-
"gnu general\|gnu lesser\|lesser general\|public license"
82+
if [ $COUNT == 0 ]; then
83+
echo "License check OK";
84+
STATUSM="All licenses OK";
85+
set_status "success" "$STATUSM";
86+
else
87+
echo "License check failed, please review license issues found";
88+
STATUSM="Needs review, ${COUNT} license issues found";
89+
set_status "success" "$STATUSM";
90+
fi
91+
92+
6293
6394
- <<: *basic-vm
6495
name: "include check"

TESTS/configs/baremetal.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"events",
3333
"kv-global-api",
3434
"sd",
35-
"qspif"
35+
"qspif",
36+
"cryptocell310"
3637
],
3738
"target_overrides": {
3839
"*": {

TESTS/events/queue/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017-2019 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/events/timing/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/host_tests/crash_reporting.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
22
Copyright (c) 2018 ARM Limited
3+
SPDX-License-Identifier: Apache-2.0
34
45
Licensed under the Apache License, Version 2.0 (the "License");
56
you may not use this file except in compliance with the License.

TESTS/host_tests/device_echo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
mbed SDK
3-
Copyright (c) 2011-2016 ARM Limited
2+
Copyright (c) 2011-2020, Arm Limited and affiliates
3+
SPDX-License-Identifier: Apache-2.0
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

TESTS/host_tests/rtc_calc_auto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
mbed SDK
3-
Copyright (c) 2011-2013 ARM Limited
2+
Copyright (c) 2011-2020, Arm Limited and affiliates
3+
SPDX-License-Identifier: Apache-2.0
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

TESTS/host_tests/rtc_reset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
mbed SDK
33
Copyright (c) 2017-2017 ARM Limited
4+
SPDX-License-Identifier: Apache-2.0
45
56
Licensed under the Apache License, Version 2.0 (the "License");
67
you may not use this file except in compliance with the License.

TESTS/host_tests/system_reset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
22
Copyright (c) 2018 ARM Limited
3+
SPDX-License-Identifier: Apache-2.0
34
45
Licensed under the Apache License, Version 2.0 (the "License");
56
you may not use this file except in compliance with the License.

TESTS/host_tests/timing_drift_auto.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
mbed SDK
33
Copyright (c) 2011-2013 ARM Limited
4+
SPDX-License-Identifier: Apache-2.0
45
56
Licensed under the Apache License, Version 2.0 (the "License");
67
you may not use this file except in compliance with the License.

TESTS/host_tests/trng_reset.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
"""
2-
Copyright (c) 2018 ARM Limited
2+
Copyright (c) 2018-2020, Arm Limited and affiliates
3+
SPDX-License-Identifier: Apache-2.0
4+
35
Licensed under the Apache License, Version 2.0 (the "License");
46
you may not use this file except in compliance with the License.
57
You may obtain a copy of the License at
68
7-
http://www.apache.org/licenses/LICENSE-2.0
9+
http://www.apache.org/licenses/LICENSE-2.0
810
911
Unless required by applicable law or agreed to in writing, software
1012
distributed under the License is distributed on an "AS IS" BASIS,

TESTS/host_tests/usb_device_hid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
mbed SDK
33
Copyright (c) 2019 ARM Limited
4+
SPDX-License-Identifier: Apache-2.0
45
56
Licensed under the Apache License, Version 2.0 (the "License");
67
you may not use this file except in compliance with the License.

TESTS/integration/COMMON/download_test.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,17 @@ size_t download_test(NetworkInterface *interface, const unsigned char *data, siz
8484
TEST_ASSERT_MESSAGE((MAX_THREADS * RECV_BUF_SIZE) >= buff_size, "Cannot test with the requested buffer size");
8585

8686
/* setup TCP socket */
87-
TCPSocket tcpsocket(interface);
87+
TCPSocket tcpsocket;
88+
SocketAddress tcp_addr;
89+
90+
interface->gethostbyname(dl_host, &tcp_addr);
91+
tcp_addr.set_port(80);
92+
93+
nsapi_error_t err = tcpsocket.open(interface);
94+
TEST_ASSERT_EQUAL_INT_MESSAGE(NSAPI_ERROR_OK, err, "unable to open socket");
8895

8996
for (int tries = 0; tries < MAX_RETRIES; tries++) {
90-
result = tcpsocket.connect(dl_host, 80);
97+
result = tcpsocket.connect(tcp_addr);
9198
TEST_ASSERT_MESSAGE(result != NSAPI_ERROR_NO_SOCKET, "out of sockets");
9299

93100
if (result == 0) {

TESTS/lorawan/loraradio/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed-crypto/sanity/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,13 @@ void test_crypto_asymmetric_sign_verify(void)
262262
psa_set_key_algorithm(&attributes, alg);
263263
psa_set_key_type(&attributes, key_type);
264264
TEST_ASSERT_EQUAL(PSA_SUCCESS, psa_import_key(&attributes, key, sizeof(key), &key_handle));
265-
TEST_ASSERT_EQUAL(PSA_SUCCESS, psa_asymmetric_sign(key_handle, alg, input, sizeof(input),
266-
signature, sizeof(signature), &signature_len));
265+
TEST_ASSERT_EQUAL(PSA_SUCCESS, psa_sign_hash(key_handle, alg, input, sizeof(input),
266+
signature, sizeof(signature), &signature_len));
267267
TEST_ASSERT_EQUAL(sizeof(signature), signature_len);
268268
TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_signature, signature, signature_len);
269269

270-
TEST_ASSERT_EQUAL(PSA_SUCCESS, psa_asymmetric_verify(key_handle, alg, input, sizeof(input),
271-
signature, signature_len));
270+
TEST_ASSERT_EQUAL(PSA_SUCCESS, psa_verify_hash(key_handle, alg, input, sizeof(input),
271+
signature, signature_len));
272272
TEST_ASSERT_EQUAL(PSA_SUCCESS, psa_destroy_key(key_handle));
273273
}
274274

TESTS/mbed_drivers/crc/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
/* mbed Microcontroller Library
33
* Copyright (c) 2018 ARM Limited
4+
* SPDX-License-Identifier: Apache-2.0
45
*
56
* Licensed under the Apache License, Version 2.0 (the "License");
67
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/dev_null/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2013-2014 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/flashiap/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
/* mbed Microcontroller Library
33
* Copyright (c) 2017 ARM Limited
4+
* SPDX-License-Identifier: Apache-2.0
45
*
56
* Licensed under the Apache License, Version 2.0 (the "License");
67
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/lp_ticker/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2013-2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/lp_timeout/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2016 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/sleep_lock/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
/* mbed Microcontroller Library
33
* Copyright (c) 2017 ARM Limited
4+
* SPDX-License-Identifier: Apache-2.0
45
*
56
* Licensed under the Apache License, Version 2.0 (the "License");
67
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/ticker/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2013-2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/timeout/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/timeout/timeout_tests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_drivers/timerevent/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_functional/callback/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_functional/callback_big/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_functional/callback_small/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/common_tickers/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/common_tickers/ticker_api_tests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017-2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/common_tickers_freq/ticker_api_test_freq.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017-2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/crc/crc_api_tests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/crc/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/critical_section/critical_section_test.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/critical_section/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/flash/functional_tests/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/lp_ticker/lp_ticker_api_tests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017-2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/lp_ticker/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

TESTS/mbed_hal/minimum_requirements/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)