Auto install too-unity for hardware unit testing

This commit is contained in:
Ivan Kravets
2016-05-30 14:31:58 +03:00
parent 2ecc007615
commit bf149c075d

View File

@ -154,10 +154,10 @@ class PlatformFactory(object):
)
else:
platform_cls = type(
str(cls.get_clsname(name)), (BasePlatform,), {})
str(cls.get_clsname(name)), (PlatformBase,), {})
_instance = platform_cls(join(platform_dir, "platform.json"))
assert isinstance(_instance, BasePlatform)
assert isinstance(_instance, PlatformBase)
return _instance
@ -313,7 +313,7 @@ class PlatformRunMixin(object):
return 1
class BasePlatform(PlatformPackagesMixin, PlatformRunMixin):
class PlatformBase(PlatformPackagesMixin, PlatformRunMixin):
_BOARDS_CACHE = {}
@ -460,6 +460,12 @@ class BasePlatform(PlatformPackagesMixin, PlatformRunMixin):
# skip all packages, allow only upload tools
self.packages[_name]['optional'] = True
if "test" in targets and "tool-unity" not in self.packages:
self.packages['tool-unity'] = {
"version": "~1.20302.0",
"optional": False
}
class PlatformBoardConfig(object):