=== modified file 'linaro_image_tools/hwpack/hwpack_fields.py'
@@ -129,7 +129,7 @@
ROOT_MIN_SIZE_FIELD: None,
LOADER_MIN_SIZE_FIELD: None,
SAMSUNG_BL1_LEN_FIELD: None,
- SAMSUNG_BL1_LEN_FIELD: None,
+ SAMSUNG_BL1_START_FIELD: None,
SAMSUNG_ENV_LEN_FIELD: None,
SAMSUNG_BL2_LEN_FIELD: None,
SNOWBALL_STARTUP_FILES_CONFIG_FIELD: None,
=== modified file 'linaro_image_tools/hwpack/tests/test_config_v3.py'
@@ -26,6 +26,10 @@
from linaro_image_tools.hwpack.config import Config, HwpackConfigError
from linaro_image_tools.hwpack.hwpack_fields import (
DEFINED_PARTITION_LAYOUTS,
+ SAMSUNG_BL1_LEN_FIELD,
+ SAMSUNG_BL1_START_FIELD,
+ SAMSUNG_BL2_LEN_FIELD,
+ SAMSUNG_ENV_LEN_FIELD,
)
@@ -796,3 +800,28 @@
self.assertValidationError("Unknown key in metadata: "
"'boards: snowball: foo'",
config._validate_keys)
+
+ def test_valid_samsung_bl1_len_field(self):
+ config = self.get_config(self.valid_start_v3 +
+ SAMSUNG_BL1_LEN_FIELD + ': 1\n')
+ self.assertEqual(None, config._validate_keys())
+
+ def test_valid_samsung_bl1_start_field(self):
+ config = self.get_config(self.valid_start_v3 +
+ SAMSUNG_BL1_START_FIELD + ': 1\n')
+ self.assertEqual(None, config._validate_keys())
+
+ def test_valid_samsung_bl2_len_field(self):
+ config = self.get_config(self.valid_start_v3 +
+ SAMSUNG_BL2_LEN_FIELD + ': 1\n')
+ self.assertEqual(None, config._validate_keys())
+
+ def test_valid_samsung_env_len_field(self):
+ config = self.get_config(self.valid_start_v3 +
+ SAMSUNG_ENV_LEN_FIELD + ': 1\n')
+ self.assertEqual(None, config._validate_keys())
+
+ def test_samsung_field_wrong(self):
+ config = self.get_config(self.valid_start_v3 +
+ 'samsung_wrong_field: 1\n')
+ self.assertRaises(HwpackConfigError, config._validate_keys)