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)
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)
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())
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)
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)
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)
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())))
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())))
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)
def test_level_one_standalone_resolution(self): r = TargetResolver(self.config) p1 = r.resolve('p1', {}) assert('p1' == p1)
def test_level_two_group_resolution(self): r = TargetResolver(self.config) gr1 = r.resolve('gr1', {}) gr2 = r.resolve('gr2', { 'gr1': gr1 }) assert('gr2' == gr2)
def test_non_plugin_tests(self): r = TargetResolver(self.config) gr1 = r.resolve('gr1', {}) assert (not gr1.plugin_tests)
def test_level_one_group_resolution(self): r = TargetResolver(self.config) gr1 = r.resolve('gr1', {}) assert('gr1' == gr1)
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)
def test_pkg_name(self): r = TargetResolver(self.config) t = r.resolve('foo', {}) assert('bar' == t.package)
def test_cmake_path(self): r = TargetResolver(self.config) t = r.resolve('t2', {}) assert('t2' == t.path())
def test_plugin_tests(self): r = TargetResolver(self.config) gr2 = r.resolve('gr2', {}) assert (gr2.plugin_tests)
def test_level_one_group_resolution(self): r = TargetResolver(self.config) gr1 = r.resolve('gr1', {}) assert('gr1' == gr1.name)
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)
def test_level_one_standalone_resolution(self): r = TargetResolver(self.config) p1 = r.resolve('p1', {}) assert('p1' == p1.name)
def test_cmake_path(self): r = TargetResolver(self.config) t = r.resolve('t1', {}) assert(P('r')/'thirdparty'/'t1' == t.path())
def test_thirdparty_cmake_path(self): r = TargetResolver(self.config) t = r.resolve('t1', {}) assert(str(P('r')/'thirdparty'/'t1') == t.path())