0
|
1 |
#
|
|
2 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
# All rights reserved.
|
|
4 |
# This component and the accompanying materials are made available
|
|
5 |
# under the terms of "Eclipse Public License v1.0"
|
|
6 |
# which accompanies this distribution, and is available
|
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
#
|
|
9 |
# Initial Contributors:
|
|
10 |
# Nokia Corporation - initial contribution.
|
|
11 |
#
|
|
12 |
# Contributors:
|
|
13 |
#
|
|
14 |
# Description:
|
|
15 |
#
|
|
16 |
|
|
17 |
import sys, os, unittest
|
|
18 |
|
|
19 |
ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
|
|
20 |
|
|
21 |
from cone.public import exceptions, plugin, api, container
|
|
22 |
from cone.public.plugin import FlatComparisonResultEntry, DuplicateImplementationEntry
|
|
23 |
from CRMLPlugin import crml_impl, crml_reader
|
|
24 |
|
|
25 |
def impl_from_resource(resource_ref, configuration):
|
|
26 |
doc_root = plugin.ReaderBase._read_xml_doc_from_resource(resource_ref, configuration)
|
|
27 |
return crml_reader.CrmlReader.read_impl(resource_ref, configuration, doc_root)
|
|
28 |
|
|
29 |
class MockGenerationContext(object):
|
|
30 |
def __init__(self):
|
|
31 |
self.tags = {}
|
|
32 |
|
|
33 |
class TestCrmlImpl(unittest.TestCase):
|
|
34 |
|
|
35 |
def setUp(self):
|
|
36 |
project_dir = os.path.join(ROOT_PATH, 'gen_project')
|
|
37 |
self.project = api.Project(api.Storage.open(project_dir))
|
|
38 |
self.config = self.project.get_configuration('root.confml')
|
|
39 |
|
|
40 |
def test_has_ref(self):
|
|
41 |
impl = impl_from_resource('Layer1/implml/00000001_feature1.crml', self.config)
|
|
42 |
self.assertTrue(impl.has_ref(['Feature1.IntSetting']))
|
|
43 |
self.assertTrue(impl.has_ref(['Feature1.RealSetting']))
|
|
44 |
self.assertTrue(impl.has_ref(['Feature1.RealSetting', 'foo.bar']))
|
|
45 |
|
|
46 |
impl = impl_from_resource('Layer1/implml/00000003_bitmask_test.crml', self.config)
|
|
47 |
self.assertTrue(impl.has_ref(['BitmaskTest.Bit0']))
|
|
48 |
self.assertFalse(impl.has_ref(['BitmaskTest.FooBit']))
|
|
49 |
|
|
50 |
impl = impl_from_resource('Layer1/implml/0000000C_key_range.crml', self.config)
|
|
51 |
self.assertTrue(impl.has_ref(['KeyRangeTest.EmptySequenceSetting']))
|
|
52 |
self.assertTrue(impl.has_ref(['KeyRangeTest.EmptySequenceSetting.StringSubSetting']))
|
|
53 |
self.assertFalse(impl.has_ref(['KeyRangeTest']))
|
|
54 |
self.assertFalse(impl.has_ref(['KeyRangeTest.Foo']))
|
|
55 |
|
|
56 |
def test_list_output_files(self):
|
3
|
57 |
def on( p2): # on = output normalization
|
|
58 |
return os.path.normpath(p2)
|
0
|
59 |
|
|
60 |
impl = impl_from_resource('Layer1/implml/00000001_feature1.crml', self.config)
|
3
|
61 |
self.assertEquals(impl.list_output_files(), [on('00000001.txt')])
|
0
|
62 |
|
|
63 |
impl = impl_from_resource('Layer1/implml/00000003_bitmask_test.crml', self.config)
|
3
|
64 |
self.assertEquals(impl.list_output_files(), [on('00000003.txt')])
|
0
|
65 |
|
|
66 |
gc = MockGenerationContext()
|
|
67 |
gc.tags['target'] = ['core']
|
|
68 |
impl.generation_context = gc
|
3
|
69 |
self.assertEquals(impl.list_output_files(), [on('00000003.txt'), on('private/100059C9/cenrep_rfs.txt')])
|
0
|
70 |
|
|
71 |
def test_is_cenrep_rfs_txt_to_be_generated(self):
|
|
72 |
impl = impl_from_resource('Layer1/implml/00000001_feature1.crml', self.config)
|
|
73 |
self.assertFalse(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
74 |
|
|
75 |
gc = MockGenerationContext()
|
|
76 |
impl.generation_context = gc
|
|
77 |
self.assertFalse(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
78 |
gc.tags['target'] = []
|
|
79 |
self.assertFalse(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
80 |
gc.tags['target'] = ['uda']
|
|
81 |
self.assertFalse(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
82 |
gc.tags['target'] = ['rofs3']
|
|
83 |
self.assertFalse(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
84 |
gc.tags['target'] = ['rofs2']
|
|
85 |
self.assertTrue(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
86 |
gc.tags['target'] = ['core']
|
|
87 |
self.assertTrue(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
88 |
gc.tags['target'] = ['core', 'rofs3']
|
|
89 |
self.assertTrue(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
90 |
gc.tags['target'] = ['uda', 'rofs2']
|
|
91 |
self.assertTrue(impl._is_cenrep_rfs_txt_to_be_generated())
|
|
92 |
|
|
93 |
def _open_config(self, project, config='root.confml'):
|
|
94 |
project_dir = os.path.join(ROOT_PATH, project)
|
|
95 |
project = api.Project(api.Storage.open(project_dir))
|
|
96 |
return project.get_configuration(config)
|
|
97 |
|
|
98 |
def test_compare(self):
|
|
99 |
conf1 = self._open_config('comp_project_1')
|
|
100 |
conf2 = self._open_config('comp_project_2')
|
|
101 |
|
|
102 |
crml_file = None
|
|
103 |
repo_uid = None
|
|
104 |
|
|
105 |
def entry(**kwargs):
|
|
106 |
kwargs['file'] = crml_file
|
|
107 |
kwargs['impl_type'] = 'crml'
|
|
108 |
kwargs['id'] = repo_uid
|
|
109 |
return plugin.FlatComparisonResultEntry(**kwargs)
|
|
110 |
|
|
111 |
comparison_result = None
|
|
112 |
|
|
113 |
crml_file = 'Layer1/implml/00000001_simple_keys.crml'
|
|
114 |
impl_filter = '00000001_simple_keys.crml$'
|
|
115 |
repo_uid = '0x00000001'
|
|
116 |
impls1 = plugin.get_impl_set(conf1, impl_filter)
|
|
117 |
impls2 = plugin.get_impl_set(conf2, impl_filter)
|
|
118 |
actual_result = impls1.flat_compare(impls2)
|
|
119 |
|
|
120 |
expected_mods = [
|
|
121 |
entry(sub_id='0x00000001', value_id='type', source_value='int', target_value='real'),
|
|
122 |
entry(sub_id='0x00000002', value_id='backup', source_value=True, target_value=False),
|
|
123 |
|
|
124 |
entry(sub_id='0x00000003', value_id='read_only', source_value=True, target_value=False),
|
|
125 |
entry(sub_id='0x00000004', value_id='read_only', source_value=False, target_value=True),
|
|
126 |
# Changing read-only changes also cap_wr
|
|
127 |
entry(sub_id='0x00000003', value_id='cap_wr', source_value='AlwaysFail', target_value=None),
|
|
128 |
entry(sub_id='0x00000004', value_id='cap_wr', source_value=None, target_value='AlwaysFail'),
|
|
129 |
|
|
130 |
entry(sub_id='0x00000005', value_id='type', source_value='int', target_value='real'),
|
|
131 |
entry(sub_id='0x00000006', value_id='name', source_value='Setting 6', target_value='Setting 6 (name changed)'),
|
|
132 |
entry(sub_id='0x00000007', value_id='ref', source_value='SimpleKeys.Setting7', target_value='SimpleKeys.Setting7RefChanged'),
|
|
133 |
entry(sub_id='0x00000008', value_id='cap_rd', source_value='ReadDeviceData', target_value='ReadUserData'),
|
|
134 |
entry(sub_id='0x00000008', value_id='cap_wr', source_value='WriteDeviceData', target_value='WriteUserData'),
|
|
135 |
entry(sub_id='0x00000008', value_id='sid_rd', source_value='0xAABBCCDD', target_value='0x11223344'),
|
|
136 |
entry(sub_id='0x00000008', value_id='sid_wr', source_value='0xDDCCBBAA', target_value='0x44332211'),
|
|
137 |
entry(sub_id='0x00000009', value_id='cap_rd', source_value='ReadDeviceData', target_value=None),
|
|
138 |
entry(sub_id='0x00000009', value_id='cap_wr', source_value='WriteDeviceData', target_value=None),
|
|
139 |
entry(sub_id='0x00000009', value_id='sid_rd', source_value='0xAABBCCDD', target_value=None),
|
|
140 |
entry(sub_id='0x00000009', value_id='sid_wr', source_value='0xDDCCBBAA', target_value=None),
|
|
141 |
]
|
|
142 |
expected_removed = [
|
|
143 |
entry(sub_id='0x10000001'),
|
|
144 |
entry(sub_id='0x10000002'),
|
|
145 |
]
|
|
146 |
expected_added = [
|
|
147 |
entry(sub_id='0x20000001'),
|
|
148 |
entry(sub_id='0x20000002'),
|
|
149 |
]
|
|
150 |
expected_result = plugin.FlatComparisonResult(modified=expected_mods,
|
|
151 |
only_in_source=expected_removed,
|
|
152 |
only_in_target=expected_added)
|
|
153 |
self.assertEquals(actual_result, expected_result)
|
|
154 |
|
|
155 |
|
|
156 |
def test_compare_all(self):
|
|
157 |
conf1 = self._open_config('comp_project_1')
|
|
158 |
conf2 = self._open_config('comp_project_2')
|
|
159 |
impls1 = plugin.get_impl_set(conf1)
|
|
160 |
impls2 = plugin.get_impl_set(conf2)
|
|
161 |
actual_result = impls1.flat_compare(impls2)
|
|
162 |
|
|
163 |
expected_result = plugin.FlatComparisonResult(
|
|
164 |
only_in_source = [
|
|
165 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x10000001'),
|
|
166 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x10000002'),
|
|
167 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001 (bit 4)'),
|
|
168 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000003 (bit 4)'),
|
|
169 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x10000001'),
|
|
170 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF (sub-key 0x00000004)'),
|
|
171 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF (sub-key 0x00000004)'),
|
|
172 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x10001001-0x10001FFF'),
|
|
173 |
FlatComparisonResultEntry(file='Layer1/implml/10000001_removed_repo.crml', impl_type='crml', id='0x10000001'),
|
|
174 |
],
|
|
175 |
only_in_target = [
|
|
176 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x20000001'),
|
|
177 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x20000002'),
|
|
178 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001 (bit 5)'),
|
|
179 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000003 (bit 5)'),
|
|
180 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x20000001'),
|
|
181 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF (sub-key 0x00000005)'),
|
|
182 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF (sub-key 0x00000005)'),
|
|
183 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x20001001-0x20001FFF'),
|
|
184 |
FlatComparisonResultEntry(file='Layer1/implml/20000001_added_repo.crml', impl_type='crml', id='0x20000001'),
|
|
185 |
],
|
|
186 |
modified = [
|
|
187 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000001', value_id='type', source_value='int', target_value='real'),
|
|
188 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000002', value_id='backup', source_value=True, target_value=False),
|
|
189 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000003', value_id='cap_wr', source_value='AlwaysFail', target_value=None),
|
|
190 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000003', value_id='read_only', source_value=True, target_value=False),
|
|
191 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000004', value_id='cap_wr', source_value=None, target_value='AlwaysFail'),
|
|
192 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000004', value_id='read_only', source_value=False, target_value=True),
|
|
193 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000005', value_id='type', source_value='int', target_value='real'),
|
|
194 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000006', value_id='name', source_value='Setting 6', target_value='Setting 6 (name changed)'),
|
|
195 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000007', value_id='ref', source_value='SimpleKeys.Setting7', target_value='SimpleKeys.Setting7RefChanged'),
|
|
196 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000008', value_id='cap_rd', source_value='ReadDeviceData', target_value='ReadUserData'),
|
|
197 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000008', value_id='cap_wr', source_value='WriteDeviceData', target_value='WriteUserData'),
|
|
198 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000008', value_id='sid_rd', source_value='0xAABBCCDD', target_value='0x11223344'),
|
|
199 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000008', value_id='sid_wr', source_value='0xDDCCBBAA', target_value='0x44332211'),
|
|
200 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000009', value_id='cap_rd', source_value='ReadDeviceData', target_value=None),
|
|
201 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000009', value_id='cap_wr', source_value='WriteDeviceData', target_value=None),
|
|
202 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000009', value_id='sid_rd', source_value='0xAABBCCDD', target_value=None),
|
|
203 |
FlatComparisonResultEntry(file='Layer1/implml/00000001_simple_keys.crml', impl_type='crml', id='0x00000001', sub_id='0x00000009', value_id='sid_wr', source_value='0xDDCCBBAA', target_value=None),
|
|
204 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001', value_id='cap_rd', source_value='ReadDeviceData', target_value='ReadUserData'),
|
|
205 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001', value_id='cap_wr', source_value='WriteDeviceData', target_value='WriteUserData'),
|
|
206 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001', value_id='name', source_value='Bitmask 1', target_value='Bitmask 1 (name changed)'),
|
|
207 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001', value_id='sid_rd', source_value='0xAABBCCDD', target_value='0x11223344'),
|
|
208 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001', value_id='sid_wr', source_value='0xDDCCBBAA', target_value='0x44332211'),
|
|
209 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001', value_id='type', source_value='int', target_value='binary'),
|
|
210 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001 (bit 2)', value_id='ref', source_value='BitmaskKeys.Bit2', target_value='BitmaskKeys.Bit2RefChanged'),
|
|
211 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000001 (bit 3)', value_id='invert', source_value=False, target_value=True),
|
|
212 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000003', value_id='name', source_value='Modified read-only bitmask', target_value='Modified read-only bitmask (name changed)'),
|
|
213 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000003', value_id='type', source_value='int', target_value='binary'),
|
|
214 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000003 (bit 2)', value_id='ref', source_value='BitmaskKeys.Bit2', target_value='BitmaskKeys.Bit2RefChanged'),
|
|
215 |
FlatComparisonResultEntry(file='Layer1/implml/00000002_bitmask_keys.crml', impl_type='crml', id='0x00000002', sub_id='0x00000003 (bit 3)', value_id='invert', source_value=False, target_value=True),
|
|
216 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='backup', source_value=True, target_value=False),
|
|
217 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='cap_rd', source_value='ReadDeviceData', target_value='ReadUserData'),
|
|
218 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='cap_wr', source_value='WriteDeviceData', target_value='WriteUserData'),
|
|
219 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='first_index', source_value=1L, target_value=2L),
|
|
220 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='index_bits', source_value='0x00000FF0', target_value='0x00001FE0'),
|
|
221 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='name', source_value='Sequence 1', target_value='Sequence 1 (name changed)'),
|
|
222 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='ref', source_value='KeyRanges.Seq1', target_value='KeyRanges.Seq1RefChanged'),
|
|
223 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='sid_rd', source_value='0x11223344', target_value='0xAABBCCDD'),
|
|
224 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF', value_id='sid_wr', source_value='0x44332211', target_value='0xDDCCBBAA'),
|
|
225 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF (sub-key 0x00000002)', value_id='name', source_value='Sub-setting 2', target_value='Sub-setting 2 (name changed)'),
|
|
226 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF (sub-key 0x00000002)', value_id='ref', source_value='SubSetting2', target_value='SubSetting2RefChanged'),
|
|
227 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00001001-0x00001FFF (sub-key 0x00000002)', value_id='type', source_value='int', target_value='real'),
|
|
228 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00002000-0x00002FFF', value_id='backup', source_value=True, target_value=False),
|
|
229 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00002000-0x00002FFF', value_id='read_only', source_value=True, target_value=False),
|
|
230 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003000-0x00003FFF', value_id='read_only', source_value=False, target_value=True),
|
|
231 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='cap_rd', source_value='ReadDeviceData', target_value='ReadUserData'),
|
|
232 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='cap_wr', source_value='WriteDeviceData', target_value='WriteUserData'),
|
|
233 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='first_index', source_value=1, target_value=2),
|
|
234 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='index_bits', source_value='0x00000FF0', target_value='0x00001FE0'),
|
|
235 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='name', source_value='Read-only sequence', target_value='Read-only sequence (name changed)'),
|
|
236 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='ref', source_value='KeyRanges.ReadOnlySeq', target_value='KeyRanges.ReadOnlySeqRefChanged'),
|
|
237 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='sid_rd', source_value='0x11223344', target_value='0xAABBCCDD'),
|
|
238 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF', value_id='sid_wr', source_value='0x44332211', target_value='0xDDCCBBAA'),
|
|
239 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF (sub-key 0x00000002)', value_id='name', source_value='Sub-setting 2', target_value='Sub-setting 2 (name changed)'),
|
|
240 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF (sub-key 0x00000002)', value_id='ref', source_value='SubSetting2', target_value='SubSetting2RefChanged'),
|
|
241 |
FlatComparisonResultEntry(file='Layer1/implml/00000003_key_ranges.crml', impl_type='crml', id='0x00000003', sub_id='0x00003001-0x00003FFF (sub-key 0x00000002)', value_id='type', source_value='int', target_value='real'),
|
|
242 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000001', value_id='key_type', source_value='simple_key', target_value='bitmask_key'),
|
|
243 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000002', value_id='key_type', source_value='bitmask_key', target_value='simple_key'),
|
|
244 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='backup', source_value=True, target_value=False),
|
|
245 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='cap_rd', source_value='ReadDeviceData', target_value='ReadUserData'),
|
|
246 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='cap_wr', source_value='AlwaysFail', target_value='WriteUserData'),
|
|
247 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='name', source_value='Bitmask key to simple key (other attrs changed also)', target_value='Bitmask key to simple key (other attrs changed also [xyz])'),
|
|
248 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='read_only', source_value=True, target_value=False),
|
|
249 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='sid_rd', source_value='0xAABBCCDD', target_value='0x11223344'),
|
|
250 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='sid_wr', source_value=None, target_value='0x44332211'),
|
|
251 |
FlatComparisonResultEntry(file='Layer1/implml/00000004_key_type_changed.crml', impl_type='crml', id='0x00000004', sub_id='0x00000003', value_id='type', source_value='int', target_value='binary'),
|
|
252 |
FlatComparisonResultEntry(file='Layer1/implml/00000005_repo_attrs_changed.crml', impl_type='crml', id='0x00000005', sub_id=None, value_id='backup', source_value=True, target_value=False),
|
|
253 |
FlatComparisonResultEntry(file='Layer1/implml/00000005_repo_attrs_changed.crml', impl_type='crml', id='0x00000005', sub_id=None, value_id='cap_rd', source_value='ReadDeviceData', target_value='ReadUserData'),
|
|
254 |
FlatComparisonResultEntry(file='Layer1/implml/00000005_repo_attrs_changed.crml', impl_type='crml', id='0x00000005', sub_id=None, value_id='cap_wr', source_value='WriteDeviceData', target_value='WriteUserData'),
|
|
255 |
FlatComparisonResultEntry(file='Layer1/implml/00000005_repo_attrs_changed.crml', impl_type='crml', id='0x00000005', sub_id=None, value_id='rfs', source_value=True, target_value=False),
|
|
256 |
FlatComparisonResultEntry(file='Layer1/implml/00000005_repo_attrs_changed.crml', impl_type='crml', id='0x00000005', sub_id=None, value_id='sid_rd', source_value='0x11223344', target_value='0xAABBCCDD'),
|
|
257 |
FlatComparisonResultEntry(file='Layer1/implml/00000005_repo_attrs_changed.crml', impl_type='crml', id='0x00000005', sub_id=None, value_id='sid_wr', source_value='0x44332211', target_value='0xDDCCBBAA'),
|
|
258 |
FlatComparisonResultEntry(file='Layer1/implml/00000005_repo_attrs_changed.crml', impl_type='crml', id='0x00000005', sub_id=None, value_id='uid_name', source_value='RepoAttrsChanged', target_value='RepoAttrsChangedXyz'),
|
|
259 |
FlatComparisonResultEntry(file='Layer1/implml/00000006_renamed_repo_xyz.crml', impl_type='crml', id='0x00000006', sub_id=None, value_id='file', source_value='Layer1/implml/00000006_renamed_repo.crml', target_value='Layer1/implml/00000006_renamed_repo_xyz.crml'),
|
|
260 |
],
|
|
261 |
duplicate = [
|
|
262 |
DuplicateImplementationEntry(impl_type='crml', id='0x30000000', files_in_source=['Layer1/implml/30000000_duplicate_repo1_proj1.crml', 'Layer1/implml/30000000_duplicate_repo2_proj1.crml'], files_in_target=['Layer1/implml/30000000_duplicate_repo2_proj2.crml', 'Layer1/implml/30000000_duplicate_repo1_proj2.crml'])
|
|
263 |
])
|
|
264 |
self.assertEquals(actual_result, expected_result)
|