mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2281 from geky/tools-ca-set-arith-fix
[tools] Fix precedence issue in cumulative attribute set-arithmeticpull/2297/head mbed-os-5.1.0-rc3
commit
36468c9acb
|
@ -169,7 +169,8 @@ class ConfigCumulativeOverride:
|
||||||
|
|
||||||
def update_target(self, target):
|
def update_target(self, target):
|
||||||
setattr(target, self.name, list(
|
setattr(target, self.name, list(
|
||||||
set(getattr(target, self.name, [])) | self.additions - self.removals))
|
(set(getattr(target, self.name, [])) | self.additions) - self.removals))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 'Config' implements the mbed configuration mechanism
|
# 'Config' implements the mbed configuration mechanism
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "lib1",
|
||||||
|
"target_overrides": {
|
||||||
|
"*": {
|
||||||
|
"target.features_remove": ["IPV4"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"custom_targets": {
|
||||||
|
"test_target": {
|
||||||
|
"core": "Cortex-M0",
|
||||||
|
"extra_labels": [],
|
||||||
|
"features": ["IPV4"],
|
||||||
|
"default_build": "standard"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Testing when adding two features
|
||||||
|
|
||||||
|
expected_results = {
|
||||||
|
"test_target": {
|
||||||
|
"desc": "test removing features",
|
||||||
|
"expected_features": []
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue