def test_check_configure_has_been_called_before_building(build_worktree): """ Test Check Configure Has Been Called Before Building """ hello_proj = build_worktree.create_project("hello") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree, [hello_proj]) with pytest.raises(qibuild.cmake_builder.NotConfigured): cmake_builder.build()
def test_check_configure_has_been_called_before_building(build_worktree): hello_proj = build_worktree.create_project("hello") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree, [hello_proj]) # pylint: disable-msg=E1101 with pytest.raises(qibuild.cmake_builder.NotConfigured): cmake_builder.build()
def test_build_host_tools(build_worktree, fake_ctc): build_worktree.add_test_project("footool") usefootool_proj = build_worktree.add_test_project("usefootool") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree, [usefootool_proj]) build_worktree.set_active_config("fake-ctc") cmake_builder.build_host_tools() cmake_builder.configure() cmake_builder.build()
def test_default_install(build_worktree, toolchains, tmpdir): hello_proj = build_worktree.create_project("hello", run_depends="bar") toolchains.create("foo") build_worktree.set_active_config("foo") toolchains.add_package("foo", "bar") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree, [hello_proj]) cmake_builder.configure() cmake_builder.build() cmake_builder.install(tmpdir.strpath)
def test_default_install(build_worktree, toolchains, tmpdir): hello_proj = build_worktree.create_project("hello", run_depends="bar") toolchains.create("foo") qibuild.config.add_build_config("foo", toolchain="foo") build_worktree.set_active_config("foo") toolchains.add_package("foo", "bar") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree, [hello_proj]) cmake_builder.configure() cmake_builder.build() cmake_builder.install(tmpdir.strpath)
def test_check_configure_called_on_runtime_deps(build_worktree): hello_proj = build_worktree.create_project("hello", run_depends=["bar"]) build_worktree.create_project("bar") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree, [hello_proj]) # qibuild configure --single cmake_builder.dep_types = [] cmake_builder.configure() # qibuild make cmake_builder.dep_types = ["build", "runtime"] # pylint: disable-msg=E1101 with pytest.raises(qibuild.cmake_builder.NotConfigured): cmake_builder.build()
def test_generate_symbols(build_worktree, tmpdir): build_worktree.add_test_project("world") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree) build_config = cmake_builder.build_config build_config.build_type = "Release" build_config.user_flags = [("QI_WITH_DEBUG_INFO", "ON")] world_proj = build_worktree.get_build_project("world") cmake_builder.projects = [world_proj] cmake_builder.configure() cmake_builder.build() dest = tmpdir.join("dest").strpath installed_files = cmake_builder.install(dest, components=["runtime"]) symbols_archive = tmpdir.join("dest", "world.symbols.zip").strpath res = qibuild.breakpad.gen_symbol_archive(base_dir=dest, output=symbols_archive) assert os.path.exists(res)
def test_generate_symbols(build_worktree, tmpdir): build_worktree.add_test_project("world") cmake_builder = qibuild.cmake_builder.CMakeBuilder(build_worktree) build_config = cmake_builder.build_config build_config.build_type = "Release" build_config.user_flags = [("QI_WITH_DEBUG_INFO", "ON")] world_proj = build_worktree.get_build_project("world") cmake_builder.projects = [world_proj] cmake_builder.configure() cmake_builder.build() dest = tmpdir.join("dest").strpath cmake_builder.install(dest, components=["runtime"]) symbols_archive = tmpdir.join("dest", "world.symbols.zip").strpath res = qibuild.breakpad.gen_symbol_archive(base_dir=dest, output=symbols_archive) assert os.path.exists(res)