Merge branch 'master' into feature/newlib_locking

This commit is contained in:
Angus Gratton 2016-08-25 12:09:21 +08:00
commit e6bc527dfb
3 changed files with 19 additions and 5 deletions

View File

@ -31,7 +31,7 @@ test_build_system:
variables: variables:
IDF_PATH: "$CI_PROJECT_DIR" IDF_PATH: "$CI_PROJECT_DIR"
script: script:
- ./make/build_system_tests.sh - ./make/test_build_system.sh
push_master_to_github: push_master_to_github:
stage: deploy stage: deploy

View File

@ -75,6 +75,8 @@
#error "include FreeRTOS.h must appear in source files before include task.h" #error "include FreeRTOS.h must appear in source files before include task.h"
#endif #endif
#include <limits.h>
#include "list.h" #include "list.h"
#include "portmacro.h" #include "portmacro.h"
@ -91,7 +93,7 @@ extern "C" {
#define tskKERNEL_VERSION_MINOR 2 #define tskKERNEL_VERSION_MINOR 2
#define tskKERNEL_VERSION_BUILD 0 #define tskKERNEL_VERSION_BUILD 0
#define tskNO_AFFINITY portNUM_PROCESSORS #define tskNO_AFFINITY INT_MAX
/** /**
* task. h * task. h

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/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 # 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. # Creates its own test build directory under TMP and cleans it up when done.
@ -131,6 +131,18 @@ function assert_built()
done 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 # verify all the arguments passed in were rebuilt relative to the snapshot
function assert_rebuilt() function assert_rebuilt()
{ {
@ -139,7 +151,7 @@ function assert_rebuilt()
if [ ! -f "${SNAPSHOT}/$1" ]; then if [ ! -f "${SNAPSHOT}/$1" ]; then
failure "File $1 should have been original build snapshot" failure "File $1 should have been original build snapshot"
fi fi
if [ ! "${SNAPSHOT}/$1" -ot "${BUILD}/$1" ]; then if ! file_was_rebuilt "$1"; then
failure "File $1 should have been rebuilt" failure "File $1 should have been rebuilt"
fi fi
shift shift
@ -155,7 +167,7 @@ function assert_not_rebuilt()
if [ ! -f "${SNAPSHOT}/$1" ]; then if [ ! -f "${SNAPSHOT}/$1" ]; then
failure "File $1 should be in snapshot build directory" failure "File $1 should be in snapshot build directory"
fi fi
if [ "${SNAPSHOT}/$1" -ot "${BUILD}/$1" ]; then if file_was_rebuilt "$1"; then
failure "File $1 should not have been rebuilt" failure "File $1 should not have been rebuilt"
fi fi
shift shift