|
|
|
@ -9202,7 +9202,7 @@ class CrossFileTests(BasePlatformTests): |
|
|
|
|
for section, entries in values.items(): |
|
|
|
|
f.write(f'[{section}]\n') |
|
|
|
|
for k, v in entries.items(): |
|
|
|
|
f.write(f"{k}='{v}'\n") |
|
|
|
|
f.write(f"{k}={v!r}\n") |
|
|
|
|
return filename |
|
|
|
|
|
|
|
|
|
def test_cross_file_dirs(self): |
|
|
|
@ -9368,6 +9368,22 @@ class CrossFileTests(BasePlatformTests): |
|
|
|
|
break |
|
|
|
|
self.assertEqual(found, 2, 'Did not find all sections.') |
|
|
|
|
|
|
|
|
|
def test_project_options_native_only(self) -> None: |
|
|
|
|
# Do not load project options from a native file when doing a cross |
|
|
|
|
# build |
|
|
|
|
testcase = os.path.join(self.unit_test_dir, '19 array option') |
|
|
|
|
config = self.helper_create_cross_file({'project options': {'list': ['bar', 'foo']}}) |
|
|
|
|
cross = self.helper_create_cross_file({'binaries': {}}) |
|
|
|
|
|
|
|
|
|
self.init(testcase, extra_args=['--native-file', config, '--cross-file', cross]) |
|
|
|
|
configuration = self.introspect('--buildoptions') |
|
|
|
|
for each in configuration: |
|
|
|
|
if each['name'] == 'list': |
|
|
|
|
self.assertEqual(each['value'], ['foo', 'bar']) |
|
|
|
|
break |
|
|
|
|
else: |
|
|
|
|
self.fail('Did not find expected option.') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TAPParserTests(unittest.TestCase): |
|
|
|
|
def assert_test(self, events, **kwargs): |
|
|
|
|