From c9eed1f181a0db90c6dcb5126350e3ce6e0b1641 Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 7 Jan 2021 17:22:43 +1000 Subject: [PATCH] Add test to ensure asserts can return --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4b59af8..943fd6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -224,6 +224,22 @@ jobs: # report-size will compile littlefs and report the size script: [*report-size] + # test compilation with asserts that return -1 + - stage: test + env: + - NAME=littlefs-assert-return + - CC="arm-linux-gnueabi-gcc --static -mthumb" + - CFLAGS="-Werror -D'LFS_ASSERT(test)=do {if(!(test)) {return -1;}} while(0)'" + if: branch !~ -prefix$ + install: + - *install-common + - sudo apt-get install + gcc-arm-linux-gnueabi + libc6-dev-armel-cross + - arm-linux-gnueabi-gcc --version + # report-size will compile littlefs and report the size + script: [*report-size] + # test compilation in thread-safe mode - stage: test env: