예제 #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())