mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2893 from theotherjimmy/toolchain-test-cleanup
[Tests] Prevent garbage generation from toolchain api testpull/2898/head
commit
79fbf94d9c
|
@ -3,7 +3,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
from string import printable
|
from string import printable
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from mock import MagicMock
|
from mock import MagicMock, patch
|
||||||
from hypothesis import given
|
from hypothesis import given
|
||||||
from hypothesis.strategies import text, lists, fixed_dictionaries
|
from hypothesis.strategies import text, lists, fixed_dictionaries
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ def test_toolchain_profile_c(profile, source_file):
|
||||||
filename = deepcopy(source_file)
|
filename = deepcopy(source_file)
|
||||||
filename[-1] += ".c"
|
filename[-1] += ".c"
|
||||||
to_compile = os.path.join(*filename)
|
to_compile = os.path.join(*filename)
|
||||||
|
with patch('os.mkdir') as _mkdir:
|
||||||
for _, tc_class in TOOLCHAIN_CLASSES.items():
|
for _, tc_class in TOOLCHAIN_CLASSES.items():
|
||||||
toolchain = tc_class(TARGET_MAP["K64F"], build_profile=profile)
|
toolchain = tc_class(TARGET_MAP["K64F"], build_profile=profile)
|
||||||
toolchain.inc_md5 = ""
|
toolchain.inc_md5 = ""
|
||||||
|
@ -61,6 +62,7 @@ def test_toolchain_profile_cpp(profile, source_file):
|
||||||
filename = deepcopy(source_file)
|
filename = deepcopy(source_file)
|
||||||
filename[-1] += ".cpp"
|
filename[-1] += ".cpp"
|
||||||
to_compile = os.path.join(*filename)
|
to_compile = os.path.join(*filename)
|
||||||
|
with patch('os.mkdir') as _mkdir:
|
||||||
for _, tc_class in TOOLCHAIN_CLASSES.items():
|
for _, tc_class in TOOLCHAIN_CLASSES.items():
|
||||||
toolchain = tc_class(TARGET_MAP["K64F"], build_profile=profile)
|
toolchain = tc_class(TARGET_MAP["K64F"], build_profile=profile)
|
||||||
toolchain.inc_md5 = ""
|
toolchain.inc_md5 = ""
|
||||||
|
@ -85,6 +87,7 @@ def test_toolchain_profile_asm(profile, source_file):
|
||||||
filename = deepcopy(source_file)
|
filename = deepcopy(source_file)
|
||||||
filename[-1] += ".s"
|
filename[-1] += ".s"
|
||||||
to_compile = os.path.join(*filename)
|
to_compile = os.path.join(*filename)
|
||||||
|
with patch('os.mkdir') as _mkdir:
|
||||||
for _, tc_class in TOOLCHAIN_CLASSES.items():
|
for _, tc_class in TOOLCHAIN_CLASSES.items():
|
||||||
toolchain = tc_class(TARGET_MAP["K64F"], build_profile=profile)
|
toolchain = tc_class(TARGET_MAP["K64F"], build_profile=profile)
|
||||||
toolchain.inc_md5 = ""
|
toolchain.inc_md5 = ""
|
||||||
|
|
Loading…
Reference in New Issue