Skip to content

Commit cef93db

Browse files
committed
Merge branch 'master' into mbed_ci-test-fixed_rtl8195am_12/2/2018
2 parents d306798 + c32b822 commit cef93db

File tree

784 files changed

+56073
-23781
lines changed

Some content is hidden

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

784 files changed

+56073
-23781
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,11 @@
1-
Notes:
2-
- Pull requests will not be accepted until the submitter has agreed to the [contributer agreement](https://github.com/ARMmbed/mbed-os/blob/master/CONTRIBUTING.md).
3-
- This is just a template, so feel free to use/remove the unnecessary things
1+
# Description
42

5-
## Description
3+
> Detailed changes summary | testing | dependencies
4+
> Good example: https://os.mbed.com/docs/latest/reference/guidelines.html#workflow (Pull request template)
65
7-
A few sentences describing the overall goals of the pull request's commits.
6+
# Pull request type
87

9-
## Status
10-
11-
**READY/IN DEVELOPMENT/HOLD**
12-
13-
## Migrations
14-
15-
If this PR changes any APIs or behaviors, give a short description of what *API users* should do when this PR is merged.
16-
17-
YES | NO
18-
19-
## Related PRs
20-
21-
List related PRs against other branches:
22-
23-
branch | PR
24-
------ | ------
25-
other_pr_production | [link]()
26-
other_pr_master | [link]()
27-
28-
## Todos
29-
30-
- [ ] Tests
31-
- [ ] Documentation
32-
33-
## Deploy notes
34-
35-
Notes regarding the deployment of this PR. These should note any required changes in the build environment, tools, compilers and so on.
36-
37-
## Steps to test or reproduce
38-
39-
Outline the steps to test or reproduce the PR here.
8+
- [ ] Fix
9+
- [ ] Refactor
10+
- [ ] New Target
11+
- [ ] Feature

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ BUILD/
1616
.mbed
1717
venv/
1818

19+
# Mbedls
20+
.mbedls-mock.lock
21+
1922
# Eclipse Project Files
2023
.cproject
2124
.project
@@ -44,6 +47,8 @@ pip-log.txt
4447
.coverage
4548
.tox
4649
nosetests.xml
50+
.cache
51+
.hypothesis
4752

4853
# Translations
4954
*.mo
@@ -72,6 +77,9 @@ debug.log
7277
# Cscope
7378
cscope.*
7479

80+
# Ctags
81+
tags
82+
7583
# vim swap files
7684
*.swp
7785
*~

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ python:
55
env:
66
global:
77
- >
8-
STATUS=$'curl -so/dev/null --user $MBED_BOT --request POST
8+
STATUS=$'curl -so/dev/null --user "$MBED_BOT" --request POST
99
https://api.github.com/repos/$TRAVIS_REPO_SLUG/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}
1010
--data @- << DATA\n{
1111
"state": "$0",
@@ -30,7 +30,8 @@ before_install:
3030
- sudo ln -s $HOME/.cache/apt /var/cache/apt/archives
3131
# Setup ppa to make sure arm-none-eabi-gcc is correct version
3232
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
33-
- sudo apt-get update -qq
33+
# Loop until update succeeds (timeouts can occur)
34+
- while [ -n "$(sudo apt-get update 2>&1 |grep Failed)" ]; do :; done
3435

3536
after_success:
3637
- bash -c "$STATUS" success "Local $NAME testing has passed"
@@ -112,6 +113,10 @@ matrix:
112113
# Check that example compiles
113114
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' $EVENTS/README.md > main.cpp
114115
- python tools/make.py -t GCC_ARM -m K64F --source=. --build=BUILD/K64F/GCC_ARM -j0
116+
# Check that example compiles without rtos
117+
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' $EVENTS/README.md > main.cpp
118+
- rm -r rtos features/netsocket features/frameworks BUILD
119+
- python tools/make.py -t GCC_ARM -m DISCO_F401VC --source=. --build=BUILD/DISCO_F401VC/GCC_ARM -j0
115120
# Run local equeue tests
116121
- make -C $EVENTS/equeue test
117122

LICENSE-BSD-3-Clause

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2017 Arm Limited and affiliates.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
2. Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
3. Neither the name of the copyright holder nor the
12+
names of its contributors may be used to endorse or promote products
13+
derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"
16+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25+
POSSIBILITY OF SUCH DAMAGE.

TESTS/events/timing/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ void semaphore_timing_test() {
107107
equeue_sema_wait(&sema, delay);
108108
int taken = timer.read_us() - start;
109109

110-
printf("delay %dms => error %dus\r\n", delay, abs(1000*delay - taken));
110+
if (taken < (delay * 1000 - 5000) || taken > (delay * 1000 + 5000)) {
111+
printf("delay %dms => error %dus\r\n", delay, abs(1000 * delay - taken));
112+
}
113+
111114
TEST_ASSERT_INT_WITHIN(5000, taken, delay * 1000);
112115

113116
led = !led;

TESTS/mbedtls/multi/main.cpp

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,67 @@
2323

2424
#include "mbedtls/sha256.h"
2525

26+
/**
27+
* \name SECTION: Compatibility code
28+
*
29+
* Depending on whether the alternative (hatdware accelerated) hashing
30+
* functions are provided or not, different API should be used for hashing.
31+
* \{
32+
*/
33+
34+
#if defined(MBEDTLS_SHA256_ALT)
35+
36+
/**
37+
* \brief This function starts a SHA-256 checksum calculation.
38+
*
39+
* \deprecated Superseded by mbedtls_sha256_starts_ret() in 2.7.0.
40+
*
41+
* \param ctx The SHA-256 context to initialize.
42+
* \param is224 Determines which function to use.
43+
* <ul><li>0: Use SHA-256.</li>
44+
* <li>1: Use SHA-224.</li></ul>
45+
*/
46+
void mbedtls_sha256_starts( mbedtls_sha256_context *ctx,
47+
int is224 )
48+
{
49+
mbedtls_sha256_starts_ret( ctx, is224 );
50+
}
51+
52+
/**
53+
* \brief This function feeds an input buffer into an ongoing
54+
* SHA-256 checksum calculation.
55+
*
56+
* \deprecated Superseded by mbedtls_sha256_update_ret() in 2.7.0.
57+
*
58+
* \param ctx The SHA-256 context to initialize.
59+
* \param input The buffer holding the data.
60+
* \param ilen The length of the input data.
61+
*/
62+
void mbedtls_sha256_update( mbedtls_sha256_context *ctx,
63+
const unsigned char *input,
64+
size_t ilen )
65+
{
66+
mbedtls_sha256_update_ret( ctx, input, ilen );
67+
}
68+
69+
/**
70+
* \brief This function finishes the SHA-256 operation, and writes
71+
* the result to the output buffer.
72+
*
73+
* \deprecated Superseded by mbedtls_sha256_finish_ret() in 2.7.0.
74+
*
75+
* \param ctx The SHA-256 context.
76+
* \param output The SHA-224or SHA-256 checksum result.
77+
*/
78+
void mbedtls_sha256_finish( mbedtls_sha256_context *ctx,
79+
unsigned char output[32] )
80+
{
81+
mbedtls_sha256_finish_ret( ctx, output );
82+
}
83+
84+
#endif /* defined(MBEDTLS_SHA256_ALT) */
85+
86+
/* \} name SECTION: Compatibility code */
2687

2788
using namespace utest::v1;
2889

TESTS/netsocket/tcp_echo/main.cpp

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#ifndef MBED_CONF_APP_CONNECT_STATEMENT
19-
#error [NOT_SUPPORTED] No network configuration found for this target.
19+
#error [NOT_SUPPORTED] No network configuration found for this target.
2020
#endif
2121

2222
#include "mbed.h"
@@ -32,18 +32,21 @@ using namespace utest::v1;
3232
#define MBED_CONF_APP_TCP_CLIENT_ECHO_BUFFER_SIZE 256
3333
#endif
3434

35-
namespace {
36-
char tx_buffer[MBED_CONF_APP_TCP_CLIENT_ECHO_BUFFER_SIZE] = {0};
37-
char rx_buffer[MBED_CONF_APP_TCP_CLIENT_ECHO_BUFFER_SIZE] = {0};
35+
namespace
36+
{
37+
char tx_buffer[MBED_CONF_APP_TCP_CLIENT_ECHO_BUFFER_SIZE] = {0};
38+
char rx_buffer[MBED_CONF_APP_TCP_CLIENT_ECHO_BUFFER_SIZE] = {0};
3839
}
3940

40-
void prep_buffer(char *tx_buffer, size_t tx_size) {
41-
for (size_t i=0; i<tx_size; ++i) {
41+
void prep_buffer(char *tx_buffer, size_t tx_size)
42+
{
43+
for (size_t i = 0; i < tx_size; ++i) {
4244
tx_buffer[i] = (rand() % 10) + '0';
4345
}
4446
}
4547

46-
void test_tcp_echo() {
48+
void test_tcp_echo()
49+
{
4750
int n = 0;
4851
NetworkInterface* net = MBED_CONF_APP_OBJECT_CONSTRUCTION;
4952
int err = MBED_CONF_APP_CONNECT_STATEMENT;
@@ -119,7 +122,8 @@ void test_tcp_echo() {
119122

120123

121124
// Test setup
122-
utest::v1::status_t test_setup(const size_t number_of_cases) {
125+
utest::v1::status_t test_setup(const size_t number_of_cases)
126+
{
123127
GREENTEA_SETUP(240, "tcp_echo");
124128
return verbose_test_setup_handler(number_of_cases);
125129
}
@@ -130,6 +134,7 @@ Case cases[] = {
130134

131135
Specification specification(test_setup, cases);
132136

133-
int main() {
137+
int main()
138+
{
134139
return !Harness::run(specification);
135140
}

0 commit comments

Comments
 (0)