mirror of https://github.com/ARMmbed/mbed-os.git
Fixes for test fails and code style update
parent
200829537f
commit
378a70ca62
|
@ -56,7 +56,7 @@ static SingletonPtr<PlatformMutex> _mutex;
|
||||||
# define OPEN_MAX _SYS_OPEN
|
# define OPEN_MAX _SYS_OPEN
|
||||||
# ifdef __MICROLIB
|
# ifdef __MICROLIB
|
||||||
# if __ARMCC_VERSION >= 6010050
|
# if __ARMCC_VERSION >= 6010050
|
||||||
asm(" .global __use_full_stdio\n");
|
asm(" .global __use_full_stdio\n");
|
||||||
# else
|
# else
|
||||||
# pragma import(__use_full_stdio)
|
# pragma import(__use_full_stdio)
|
||||||
# endif
|
# endif
|
||||||
|
@ -1255,7 +1255,7 @@ extern "C" WEAK caddr_t _sbrk(int incr)
|
||||||
/* __HeapLimit is end of heap section */
|
/* __HeapLimit is end of heap section */
|
||||||
if (new_heap > (uint32_t) &__HeapLimit) {
|
if (new_heap > (uint32_t) &__HeapLimit) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return (caddr_t) -1;
|
return (caddr_t) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
heap = new_heap;
|
heap = new_heap;
|
||||||
|
|
|
@ -30,8 +30,11 @@ from intelhex import IntelHex
|
||||||
Tests for build_api.py
|
Tests for build_api.py
|
||||||
"""
|
"""
|
||||||
make_mock_target = namedtuple(
|
make_mock_target = namedtuple(
|
||||||
"Target", "init_hooks name features core supported_toolchains")
|
"Target", "init_hooks name features core supported_toolchains build_tools_metadata")
|
||||||
|
#Add ARMC5 to the supported_toolchains list as ARMC5 actually refers ARM Compiler 5 and is needed by ARM/ARM_STD classes when it checks for supported toolchains
|
||||||
|
TOOLCHAINS.add("ARMC5")
|
||||||
|
#Make a mock build_tools_metadata
|
||||||
|
mock_build_tools_metadata = {u'version':0, u'public':False}
|
||||||
|
|
||||||
class BuildApiTests(unittest.TestCase):
|
class BuildApiTests(unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
|
@ -92,7 +95,7 @@ class BuildApiTests(unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
app_config = "app_config"
|
app_config = "app_config"
|
||||||
mock_target = make_mock_target(lambda _, __ : None,
|
mock_target = make_mock_target(lambda _, __ : None,
|
||||||
"Junk", [], "Cortex-M3", TOOLCHAINS)
|
"Junk", [], "Cortex-M3", TOOLCHAINS, mock_build_tools_metadata)
|
||||||
mock_config_init.return_value = namedtuple(
|
mock_config_init.return_value = namedtuple(
|
||||||
"Config", "target has_regions name")(mock_target, False, None)
|
"Config", "target has_regions name")(mock_target, False, None)
|
||||||
|
|
||||||
|
@ -111,7 +114,7 @@ class BuildApiTests(unittest.TestCase):
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
mock_target = make_mock_target(lambda _, __ : None,
|
mock_target = make_mock_target(lambda _, __ : None,
|
||||||
"Junk", [], "Cortex-M3", TOOLCHAINS)
|
"Junk", [], "Cortex-M3", TOOLCHAINS, mock_build_tools_metadata)
|
||||||
mock_config_init.return_value = namedtuple(
|
mock_config_init.return_value = namedtuple(
|
||||||
"Config", "target has_regions name")(mock_target, False, None)
|
"Config", "target has_regions name")(mock_target, False, None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue