Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
--- /dev/null
+# Menu: HEADER
+# FORMAT: 4
+# ARCH: amd64 armhf
+# FLAVOUR: amd64-baz
+# FLAVOUR_DEP: {"amd64-baz": "amd64-foo"}
+
+include "annotations.load.1"
+
+CONFIG_B_2 policy<{'amd64': '5'}> note<override Config B_2>
--- /dev/null
+{
+ "arch": [
+ "amd64",
+ "armhf"
+ ],
+ "flavour": [
+ "amd64-baz"
+ ],
+ "flavour_dep": {
+ "amd64-baz": "amd64-foo"
+ },
+ "include": [
+ "annotations.load.1"
+ ],
+ "config": {
+ "CONFIG_A_1": {
+ "policy": {
+ "amd64": "1",
+ "armhf": "1"
+ },
+ "note": "'Config A_1'"
+ },
+ "CONFIG_B_2": {
+ "policy": {
+ "amd64": "5",
+ "armhf": "2"
+ },
+ "note": "'override Config B_2'"
+ }
+ }
+}
--- /dev/null
+import unittest
+
+from tests import utils
+
+from kconfig.annotations import Annotation
+
+
+class TestLoadAnnotations(unittest.TestCase):
+ def test_load(self):
+ for d in ("annotations.derivative.1",):
+ f = "tests/data/" + d
+ a = Annotation(f)
+ r = utils.load_json(f + ".result")
+ self.assertEqual(utils.to_dict(a), r)