Skip to content

Commit 7213826

Browse files
Merge branch 'ARMmbed:master' into adcBank
2 parents 0c9523a + 77927d0 commit 7213826

File tree

1,539 files changed

+332451
-50168
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,539 files changed

+332451
-50168
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,5 @@ DELIVERY/
102102
CMakeCache.txt
103103
cmake_install.cmake
104104
CMakeFiles/
105+
cmake_build/
106+
Testing/

.travis.yml

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
language: sh
1818
os: linux
19-
dist: xenial
19+
dist: focal
2020

2121

2222
env:
@@ -35,8 +35,15 @@ before_install:
3535

3636
addons:
3737
apt:
38+
sources:
39+
- sourceline: 'deb https://apt.kitware.com/ubuntu/ focal main'
40+
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
3841
packages:
39-
- ninja-build
42+
- cmake
43+
- ninja-build
44+
- gcovr
45+
- libncursesw5
46+
- g++-7
4047

4148
matrix:
4249
include:
@@ -216,10 +223,10 @@ matrix:
216223
### Python Tests ###
217224
- &pytools-vm
218225
stage: "Pytest"
219-
name: "tools-py27"
220-
env: NAME=tools-py2.7
226+
name: "tools-py35"
227+
env: NAME=tools-py3.5
221228
language: python
222-
python: 2.7
229+
python: 3.5
223230
install:
224231
# Install gcc
225232
- source_pkg gcc
@@ -246,11 +253,6 @@ matrix:
246253
- coverage run -a tools/project.py -S | sed -n '/^Total/p'
247254
- coverage html
248255

249-
- <<: *pytools-vm
250-
name: "tools-py35"
251-
env: NAME=tools-py3.5
252-
python: 3.5
253-
254256
- <<: *pytools-vm
255257
name: "tools-py36"
256258
env: NAME=tools-py3.6
@@ -261,68 +263,8 @@ matrix:
261263
env: NAME=tools-py3.7
262264
python: 3.7
263265

264-
265-
### Extended Tests ###
266266
- &extended-vm
267-
stage: "Extended"
268-
name: "littlefs"
269-
env: NAME=littlefs LITTLEFS=storage/filesystem/littlefs
270-
language: python
271-
python: 3.7
272-
install:
273-
# Install gcc
274-
- source_pkg gcc
275-
- arm-none-eabi-gcc --version
276-
# Install python modules
277-
- python -m pip install --upgrade pip==18.1
278-
- python -m pip install --upgrade setuptools==40.4.3
279-
- pip install -r requirements.txt
280-
- pip list --verbose
281-
# Install test-specific packages
282-
- source_pkg fuse
283-
- source_pkg libfuse-dev
284-
- fusermount --version
285-
before_script:
286-
# Setup and patch littlefs-fuse
287-
- git clone https://github.com/armmbed/littlefs-fuse littlefs_fuse
288-
- git -C littlefs_fuse checkout 3f1ed6e37799e49e3710830dc6abb926d5503cf2
289-
- echo '*' > littlefs_fuse/.mbedignore
290-
- rm -rf littlefs_fuse/littlefs/*
291-
- cp -r $(git ls-tree --name-only HEAD ${LITTLEFS}/littlefs/) littlefs_fuse/littlefs
292-
# Create file-backed disk
293-
- mkdir MOUNT
294-
- sudo chmod a+rw /dev/loop0
295-
- dd if=/dev/zero bs=512 count=2048 of=DISK
296-
- losetup /dev/loop0 DISK
297-
- CFLAGS="-Werror -Wno-format"
298-
script:
299-
# Run local littlefs tests
300-
- make -C${LITTLEFS}/littlefs test QUIET=1
301-
# Run local littlefs tests with set of variations
302-
- make -C${LITTLEFS}/littlefs test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=64 -DLFS_PROG_SIZE=64"
303-
- make -C${LITTLEFS}/littlefs test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1"
304-
- make -C${LITTLEFS}/littlefs test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512"
305-
- make -C${LITTLEFS}/littlefs test QUIET=1 CFLAGS+="-DLFS_BLOCK_COUNT=1023 -DLFS_LOOKAHEAD=2048"
306-
- make -C${LITTLEFS}/littlefs clean test QUIET=1 CFLAGS+="-DLFS_NO_INTRINSICS"
307-
# Self-hosting littlefs fuzz test with littlefs-fuse
308-
- make -Clittlefs_fuse
309-
- littlefs_fuse/lfs --format /dev/loop0
310-
- littlefs_fuse/lfs /dev/loop0 MOUNT
311-
- ls MOUNT
312-
- mkdir MOUNT/littlefs
313-
- cp -r $(git ls-tree --name-only HEAD ${LITTLEFS}/littlefs/) MOUNT/littlefs
314-
- ls MOUNT/littlefs
315-
- CFLAGS="-Wno-format" make -CMOUNT/littlefs -B test_dirs test_files QUIET=1
316-
# Compile and find the code size with smallest configuration
317-
- cd ${TRAVIS_BUILD_DIR}/${LITTLEFS}/littlefs
318-
- make clean size
319-
CC='arm-none-eabi-gcc -mthumb'
320-
OBJ="$(ls lfs*.o | tr '\n' ' ')"
321-
CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR"
322-
| tee sizes
323-
- ccache -s
324-
- <<: extended-pinvalidate
325-
stage: "Extended"
267+
stage: "Pin validation"
326268
name: "pinvalidate"
327269
env: NAME=pinvalidate
328270
language: python
@@ -343,3 +285,61 @@ matrix:
343285
| while read file; do python ./hal/tests/pinvalidate/pinvalidate.py -vfp "${file}"; done
344286
- git diff --exit-code --diff-filter=d --color
345287

288+
### CMake Check ###
289+
- &cmake-vm
290+
stage: "CMake Check"
291+
name: "Backward compatiblity check - MBED_TEST_MODE"
292+
env: NAME=mbed-test-mode-check ROOT=tools/cmake/tests/mbed_test_mode/ TOOLCHAIN=GCC_ARM TARGET_NAME=K64F PROFILE=develop
293+
language: python
294+
python: 3.8
295+
install:
296+
# Hide Travis-preinstalled CMake
297+
# The Travis-preinstalled CMake is unfortunately not installed via apt, so we
298+
# can't replace it with an apt-supplied version very easily. Additionally, we
299+
# can't permit the Travis-preinstalled copy to survive, as the Travis default
300+
# path lists the Travis CMake install location ahead of any place where apt
301+
# would install CMake to. Instead of apt removing or upgrading to a new CMake
302+
# version, we must instead delete the Travis copy of CMake.
303+
- sudo rm -rf /usr/local/cmake*
304+
# Setup ccache
305+
- ccache -o compiler_check=content
306+
- ccache -M 1G
307+
- pushd /usr/lib/ccache
308+
- sudo ln -s ../../bin/ccache arm-none-eabi-gcc
309+
- sudo ln -s ../../bin/ccache arm-none-eabi-g++
310+
- export PATH="/usr/lib/ccache:$PATH"
311+
- popd
312+
# Install arm-none-eabi-gcc
313+
- pushd /home/travis/build && mkdir arm-gcc && cd arm-gcc
314+
- curl -L0 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2?revision=05382cca-1721-44e1-ae19-1e7c3dc96118&la=en&hash=D7C9D18FCA2DD9F894FD9F3C3DC9228498FA281A" --output gcc-arm-none-eabi-9-2020-q2-update.tar.bz2
315+
- tar xf gcc-arm-none-eabi-9-2020-q2-update.tar.bz2
316+
- export PATH="$PATH:${PWD}/gcc-arm-none-eabi-9-2020-q2-update/bin"
317+
- popd
318+
- arm-none-eabi-gcc --version
319+
# Install python modules
320+
- pip install --upgrade mbed-tools
321+
- pip install -r tools/cmake/requirements.txt
322+
script:
323+
- mbedtools configure -p ${ROOT} -t ${TOOLCHAIN} -m ${TARGET_NAME} --mbed-os-path .
324+
- cmake -S ${ROOT} -B ${ROOT}/cmake_build/${TARGET_NAME}/${PROFILE}/${TOOLCHAIN}/ -GNinja -DCMAKE_BUILD_TYPE=${PROFILE}
325+
- cmake --build ${ROOT}/cmake_build/${TARGET_NAME}/${PROFILE}/${TOOLCHAIN}/
326+
327+
### Mbed OS unittest ###
328+
- &cmake-build-run-unittest
329+
stage: "CMake"
330+
name: "CMake unittest build"
331+
env: NAME=cmake_unittest
332+
install:
333+
# Hide Travis-preinstalled CMake
334+
# The Travis-preinstalled CMake is unfortunately not installed via apt, so we
335+
# can't replace it with an apt-supplied version very easily. Additionally, we
336+
# can't permit the Travis-preinstalled copy to survive, as the Travis default
337+
# path lists the Travis CMake install location ahead of any place where apt
338+
# would install CMake to. Instead of apt removing or upgrading to a new CMake
339+
# version, we must instead delete the Travis copy of CMake.
340+
- sudo rm -rf /usr/local/cmake*
341+
script:
342+
- echo ctest --build-and-test . build --build-generator Ninja --build-options -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON -DCMAKE_CXX_COMPILER=g++-7 -DCMAKE_C_COMPILER=gcc-7 --test-command ctest
343+
- ctest --build-and-test . build --build-generator Ninja --build-options -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON -DCMAKE_CXX_COMPILER=g++-7 -DCMAKE_C_COMPILER=gcc-7 --test-command ctest
344+
- gcovr --gcov-executable gcov-7 -r . ./build -s -e ".*\.h" --exclude-directories=$TRAVIS_BUILD_DIR/build/UNITTESTS --exclude-directories=$TRAVIS_BUILD_DIR/build/_deps
345+
- ccache -s

0 commit comments

Comments
 (0)