示例#1
0
    def test_level_two_group_resolution(self):
        r = TargetResolver(self.config)

        p1 = r.resolve('p1', {})
        assert('p1' == p1)

        p2 = r.resolve('p2', { 'p1': p1 })
        assert('p2' == p2)
示例#2
0
    def test_level_two_group_resolution(self):
        r = TargetResolver(self.config)

        p1 = r.resolve('p1', {})
        assert('p1' == p1.name)

        p2 = r.resolve('p2', { 'p1': p1 })
        assert('p2' == p2.name)
示例#3
0
    def test_application_resolution_implicit_member(self):
        r = TargetResolver(self.config)

        gr1 = r.resolve('gr1', {})
        app2 = r.resolve('app2', {'gr1': gr1})
        assert ('app2' == app2.name)
        assert (gr1 in app2.dependencies())
        main_file = P('r') / 'applications' / 'app2' / 'app2.m.cpp'
        assert (str(main_file) in app2.sources())
示例#4
0
    def test_level_one_group_resolution_packages(self):
        ur = TargetResolver(self.config)
        pr = PackageResolver(P('r')/'groups'/'gr1')

        gr1 = ur.resolve('gr1', {})
        assert('gr1' == gr1)
        assert(resolve(pr, ['gr1p1', 'gr1p2']) == gr1._packages)
示例#5
0
    def test_package_cmake_overrides(self):
        r = TargetResolver(self.config)

        p3 = r.resolve('p3', {})
        assert ('p3' == p3.name)
        assert (str(P('r') / 'standalones' / 'p3' /
                    'p3.cmake') == p3.overrides)
示例#6
0
    def test_level_one_group_resolution_packages(self):
        ur = TargetResolver(self.config)
        pr = PackageResolver(P('r') / 'groups' / 'gr1')

        gr1 = ur.resolve('gr1', {})
        assert ('gr1' == gr1)
        assert (resolve(pr, ['gr1p1', 'gr1p2']) == gr1._packages)
示例#7
0
    def test_level_one_standalone_resolution_components(self):
        r = TargetResolver(self.config)

        p1 = r.resolve('p1', {})
        assert('p1' == p1)

        c1 = P('r')/'adapters'/'p1'/'p1c1.cpp'
        c2 = P('r')/'adapters'/'p1'/'p1c2.cpp'
        assert([c1, c2] == list(sorted(p1.sources())))
示例#8
0
    def test_level_one_standalone_resolution_components(self):
        r = TargetResolver(self.config)

        p1 = r.resolve('p1', {})
        assert('p1' == p1.name)

        c1 = P('r')/'adapters'/'p1'/'p1c1.cpp'
        c2 = P('r')/'adapters'/'p1'/'p1c2.cpp'
        assert([str(c1), str(c2)] == list(sorted(p1.sources())))
示例#9
0
    def test_package_cmake_overrides(self):
        r = TargetResolver(self.config)

        p3 = r.resolve('p3', {})
        assert('p3' == p3.name)
        assert(str(P('r')/'adapters'/'p3'/'p3.cmake') == p3.overrides)
示例#10
0
    def test_level_one_standalone_resolution(self):
        r = TargetResolver(self.config)

        p1 = r.resolve('p1', {})
        assert('p1' == p1)
示例#11
0
    def test_level_two_group_resolution(self):
        r = TargetResolver(self.config)

        gr1 = r.resolve('gr1', {})
        gr2 = r.resolve('gr2', { 'gr1': gr1 })
        assert('gr2' == gr2)
示例#12
0
 def test_non_plugin_tests(self):
     r = TargetResolver(self.config)
     gr1 = r.resolve('gr1', {})
     assert (not gr1.plugin_tests)
示例#13
0
    def test_level_one_group_resolution(self):
        r = TargetResolver(self.config)

        gr1 = r.resolve('gr1', {})
        assert('gr1' == gr1)
示例#14
0
 def test_lazily_bound_bar(self):
     r   = TargetResolver(self.config)
     p1  = r.resolve('p1',  {})
     bar = r.resolve('bar', { 'p1': p1 })
     p2  = r.resolve('p2',  { 'bar': bar, 'p1': p1 })
     assert(p2.lazily_bound)
示例#15
0
 def test_pkg_name(self):
     r = TargetResolver(self.config)
     t = r.resolve('foo', {})
     assert('bar' == t.package)
示例#16
0
 def test_cmake_path(self):
     r = TargetResolver(self.config)
     t = r.resolve('t2', {})
     assert('t2' == t.path())
示例#17
0
 def test_plugin_tests(self):
     r = TargetResolver(self.config)
     gr2 = r.resolve('gr2', {})
     assert (gr2.plugin_tests)
示例#18
0
    def test_level_one_group_resolution(self):
        r = TargetResolver(self.config)

        gr1 = r.resolve('gr1', {})
        assert('gr1' == gr1.name)
示例#19
0
    def test_level_two_group_resolution(self):
        r = TargetResolver(self.config)

        gr1 = r.resolve('gr1', {})
        gr2 = r.resolve('gr2', { 'gr1': gr1 })
        assert('gr2' == gr2.name)
示例#20
0
    def test_level_one_standalone_resolution(self):
        r = TargetResolver(self.config)

        p1 = r.resolve('p1', {})
        assert('p1' == p1.name)
示例#21
0
 def test_cmake_path(self):
     r = TargetResolver(self.config)
     t = r.resolve('t1', {})
     assert(P('r')/'thirdparty'/'t1' == t.path())
示例#22
0
 def test_thirdparty_cmake_path(self):
     r = TargetResolver(self.config)
     t = r.resolve('t1', {})
     assert(str(P('r')/'thirdparty'/'t1') == t.path())