configurationengine/source/plugins/symbian/ConeGenconfmlPlugin/genconfmlplugin/tests/unittest_generation.py
equal
deleted
inserted
replaced
12 # Contributors: |
12 # Contributors: |
13 # |
13 # |
14 # Description: |
14 # Description: |
15 # |
15 # |
16 |
16 |
17 import sys, os, unittest |
17 import os |
18 import __init__ |
|
19 |
18 |
20 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
19 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
21 |
20 |
22 from testautomation.base_testcase import BaseTestCase |
21 from testautomation.base_testcase import BaseTestCase |
23 from cone.public import exceptions, plugin, api, container |
22 from cone.public import plugin, api |
24 |
23 |
25 def abspath(path): |
24 def abspath(path): |
26 return os.path.normpath(os.path.join(ROOT_PATH, path)) |
25 return os.path.normpath(os.path.join(ROOT_PATH, path)) |
27 |
26 |
28 class TestGenconfmlGeneration(BaseTestCase): |
27 class TestGenconfmlGeneration(BaseTestCase): |
41 |
40 |
42 self.remove_if_exists(output_dir) |
41 self.remove_if_exists(output_dir) |
43 |
42 |
44 prj = api.Project(api.Storage.open(project_dir)) |
43 prj = api.Project(api.Storage.open(project_dir)) |
45 config = prj.get_configuration(config) |
44 config = prj.get_configuration(config) |
|
45 context = plugin.GenerationContext(configuration=config, |
|
46 output=output_dir) |
|
47 context.filtering_disabled = True |
46 impls = plugin.get_impl_set(config, 'gcfml$') |
48 impls = plugin.get_impl_set(config, 'gcfml$') |
47 impls.output = output_dir |
49 impls.generate(context) |
48 impls.generate() |
|
49 |
50 |
50 self.assert_dir_contents_equal(output_dir, expected_dir, ['.svn'] + ignores) |
51 self.assert_dir_contents_equal(output_dir, expected_dir, ['.svn'] + ignores) |