From 580fd635e56c796bdf6d99430480f640328b7723 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 25 Aug 2016 11:12:48 +0800 Subject: [PATCH 1/3] FreeRTOS: Change tskNO_AFFINITY value to not match CPU 1 when UNICORE is set --- components/freertos/include/freertos/task.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/freertos/include/freertos/task.h b/components/freertos/include/freertos/task.h index d771ca6539..ddf7a7589d 100644 --- a/components/freertos/include/freertos/task.h +++ b/components/freertos/include/freertos/task.h @@ -75,6 +75,8 @@ #error "include FreeRTOS.h must appear in source files before include task.h" #endif +#include + #include "list.h" #include "portmacro.h" @@ -91,7 +93,7 @@ extern "C" { #define tskKERNEL_VERSION_MINOR 2 #define tskKERNEL_VERSION_BUILD 0 -#define tskNO_AFFINITY portNUM_PROCESSORS +#define tskNO_AFFINITY INT_MAX /** * task. h From f54348ff834fb9b931779e915a57503eb04203f2 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 25 Aug 2016 11:54:37 +0800 Subject: [PATCH 2/3] build_system_tests.sh: Replace use of second-precision-only [ a -ot b ] --- make/build_system_tests.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/make/build_system_tests.sh b/make/build_system_tests.sh index 5824cf2b8e..b361e0b8ee 100755 --- a/make/build_system_tests.sh +++ b/make/build_system_tests.sh @@ -131,6 +131,18 @@ function assert_built() done } +# Test if a file has been rebuilt. +function file_was_rebuilt() +{ + # can't use [ a -ot b ] here as -ot only gives second resolution + # but stat -c %y seems to be microsecond at least for tmpfs, ext4.. + if [ "$(stat -c %y ${SNAPSHOT}/$1)" != "$(stat -c %y ${BUILD}/$1)" ]; then + return 0 + else + return 1 + fi +} + # verify all the arguments passed in were rebuilt relative to the snapshot function assert_rebuilt() { @@ -139,7 +151,7 @@ function assert_rebuilt() if [ ! -f "${SNAPSHOT}/$1" ]; then failure "File $1 should have been original build snapshot" fi - if [ ! "${SNAPSHOT}/$1" -ot "${BUILD}/$1" ]; then + if ! file_was_rebuilt "$1"; then failure "File $1 should have been rebuilt" fi shift @@ -155,7 +167,7 @@ function assert_not_rebuilt() if [ ! -f "${SNAPSHOT}/$1" ]; then failure "File $1 should be in snapshot build directory" fi - if [ "${SNAPSHOT}/$1" -ot "${BUILD}/$1" ]; then + if file_was_rebuilt "$1"; then failure "File $1 should not have been rebuilt" fi shift From 7458f9193b922ffee542ef6473bd8851395ccd80 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 25 Aug 2016 11:55:47 +0800 Subject: [PATCH 3/3] Rename build_system_tests to less-ambiguous test_build_system Before it was unclear if we were building the system tests or testing the build system. --- .gitlab-ci.yml | 2 +- make/{build_system_tests.sh => test_build_system.sh} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename make/{build_system_tests.sh => test_build_system.sh} (99%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b5b3ac651..38aa660d4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ test_build_system: variables: IDF_PATH: "$CI_PROJECT_DIR" script: - - ./make/build_system_tests.sh + - ./make/test_build_system.sh push_master_to_github: stage: deploy diff --git a/make/build_system_tests.sh b/make/test_build_system.sh similarity index 99% rename from make/build_system_tests.sh rename to make/test_build_system.sh index b361e0b8ee..5de216dea3 100755 --- a/make/build_system_tests.sh +++ b/make/test_build_system.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Build system tests +# Test the build system for basic consistency # # Just a bash script that tests some likely make failure scenarios in a row # Creates its own test build directory under TMP and cleans it up when done.