diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 565: Merged fixes for bug 1054422.

Message ID 20120925074211.19406.14910.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Milo Casagrande Sept. 25, 2012, 7:42 a.m. UTC
Merge authors:
  Milo Casagrande (milo)
------------------------------------------------------------
revno: 565 [merge]
committer: Milo Casagrande <milo@ubuntu.com>
branch nick: trunk
timestamp: Tue 2012-09-25 09:41:02 +0200
message:
  Merged fixes for bug 1054422.
modified:
  linaro_image_tools/hwpack/hwpack_fields.py
  linaro_image_tools/hwpack/tests/test_config_v3.py


--
lp:linaro-image-tools
https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk

You are subscribed to branch lp:linaro-image-tools.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'linaro_image_tools/hwpack/hwpack_fields.py'
--- linaro_image_tools/hwpack/hwpack_fields.py	2012-08-28 06:02:43 +0000
+++ linaro_image_tools/hwpack/hwpack_fields.py	2012-09-24 09:07:37 +0000
@@ -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'
--- linaro_image_tools/hwpack/tests/test_config_v3.py	2012-08-28 17:34:16 +0000
+++ linaro_image_tools/hwpack/tests/test_config_v3.py	2012-09-24 11:29:40 +0000
@@ -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)