當前位置: 首頁>>代碼示例>>Python>>正文


Python TestBuildWorkTree.get_build_project方法代碼示例

本文整理匯總了Python中qibuild.test.conftest.TestBuildWorkTree.get_build_project方法的典型用法代碼示例。如果您正苦於以下問題:Python TestBuildWorkTree.get_build_project方法的具體用法?Python TestBuildWorkTree.get_build_project怎麽用?Python TestBuildWorkTree.get_build_project使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qibuild.test.conftest.TestBuildWorkTree的用法示例。


在下文中一共展示了TestBuildWorkTree.get_build_project方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_bad_qibuild_config_with_qitest_json

# 需要導入模塊: from qibuild.test.conftest import TestBuildWorkTree [as 別名]
# 或者: from qibuild.test.conftest.TestBuildWorkTree import get_build_project [as 別名]
def test_bad_qibuild_config_with_qitest_json(args, qibuild_action, monkeypatch):
    qibuild_action.add_test_project("testme")
    qibuild_action("add-config", "foo")
    qibuild_action("configure", "--config", "foo", "testme")
    build_worktree = TestBuildWorkTree()
    build_worktree.set_active_config("foo")
    testme_proj = build_worktree.get_build_project("testme")
    testme_sdk = testme_proj.sdk_directory
    qitest_json = os.path.join(testme_sdk, "qitest.json")
    monkeypatch.chdir(testme_proj.path)
    args.qitest_jsons = [qitest_json]
    test_runners = qitest.parsers.get_test_runners(args)
開發者ID:alkino,項目名稱:qibuild,代碼行數:14,代碼來源:test_parsers.py

示例2: test_pure_c_project

# 需要導入模塊: from qibuild.test.conftest import TestBuildWorkTree [as 別名]
# 或者: from qibuild.test.conftest.TestBuildWorkTree import get_build_project [as 別名]
def test_pure_c_project(qibuild_action, tmpdir):
    """ Test Pure C Project """
    work = tmpdir.join("work")
    foo1 = work.mkdir("foo")
    foo1.join("CMakeLists.txt").write("""\ncmake_minimum_required(VERSION 3.0)\nproject(foo C)\n""")
    qibuild_action.chdir(foo1.strpath)
    qibuild_action("convert", "--go")
    qibuild_action.chdir(work.strpath)
    build_worktree = TestBuildWorkTree()
    worktree = build_worktree.worktree
    worktree.add_project("foo")
    assert build_worktree.get_build_project("foo")
開發者ID:aldebaran,項目名稱:qibuild,代碼行數:14,代碼來源:test_qibuild_convert.py

示例3: test_using_fake_ctc

# 需要導入模塊: from qibuild.test.conftest import TestBuildWorkTree [as 別名]
# 或者: from qibuild.test.conftest.TestBuildWorkTree import get_build_project [as 別名]
def test_using_fake_ctc(qibuild_action, fake_ctc):
    """ Test Using Fake Cross Toolchain """
    qibuild_action.add_test_project("footool")
    qibuild_action("configure", "footool", "--config", "fake-ctc")
    qibuild_action("make", "footool", "--config", "fake-ctc")
    build_worktree = TestBuildWorkTree()
    build_worktree.set_active_config("fake-ctc")
    footool_proj = build_worktree.get_build_project("footool")
    # assert that bin/footool exists but cannot be run:
    footool = qibuild.find.find_bin([footool_proj.sdk_directory], "footool",
                                    expect_one=True)
    assert os.path.exists(footool)
    with pytest.raises(Exception):
        qisys.command.call([footool])
開發者ID:aldebaran,項目名稱:qibuild,代碼行數:16,代碼來源:test_qibuild_configure.py

示例4: test_staged_path_first_in_path_conf

# 需要導入模塊: from qibuild.test.conftest import TestBuildWorkTree [as 別名]
# 或者: from qibuild.test.conftest.TestBuildWorkTree import get_build_project [as 別名]
def test_staged_path_first_in_path_conf(qibuild_action, toolchains):
    """ Test Staged Path First In Path Conf """
    toolchains.create("foo")
    qibuild.config.add_build_config("foo", toolchain="foo")
    bar_package = toolchains.add_package("foo", "bar")
    qibuild_action.add_test_project("stagepath")
    qibuild_action("configure", "stagepath", "--config", "foo")
    build_worktree = TestBuildWorkTree()
    build_worktree.set_active_config("foo")
    stagepath_proj = build_worktree.get_build_project("stagepath")
    path_conf = read_path_conf(stagepath_proj)
    lines = path_conf.splitlines()
    assert lines == [
        stagepath_proj.path,
        stagepath_proj.sdk_directory,
        bar_package.path
    ]
開發者ID:aldebaran,項目名稱:qibuild,代碼行數:19,代碼來源:test_qibuild_configure.py

示例5: test_path_conf_contains_toolchain_paths

# 需要導入模塊: from qibuild.test.conftest import TestBuildWorkTree [as 別名]
# 或者: from qibuild.test.conftest.TestBuildWorkTree import get_build_project [as 別名]
def test_path_conf_contains_toolchain_paths(qibuild_action, toolchains):
    toolchains.create("foo")
    qibuild.config.add_build_config("foo", toolchain="foo")
    toolchains.add_package("foo", "bar")
    foo_tc = qitoolchain.get_toolchain("foo")
    bar_path = foo_tc.get_package("bar").path
    qibuild_action.add_test_project("hello")
    qibuild_action.add_test_project("world")
    build_woktree = TestBuildWorkTree()
    build_woktree.build_config.set_active_config("foo")
    qibuild_action("configure", "hello", "--config", "foo")
    world_proj = build_woktree.get_build_project("world")
    hello_proj = build_woktree.get_build_project("hello")
    path_conf = os.path.join(hello_proj.sdk_directory, "share", "qi", "path.conf")
    with open(path_conf, "r") as fp:
        contents = fp.readlines()
    sdk_dirs = [x.strip() for x in contents]
    assert hello_proj.sdk_directory in sdk_dirs
    assert world_proj.sdk_directory in sdk_dirs
    assert bar_path in sdk_dirs
開發者ID:dmerejkowsky,項目名稱:qibuild,代碼行數:22,代碼來源:test_qibuild_configure.py

示例6: test_add_build_project

# 需要導入模塊: from qibuild.test.conftest import TestBuildWorkTree [as 別名]
# 或者: from qibuild.test.conftest.TestBuildWorkTree import get_build_project [as 別名]
def test_add_build_project(git_server, qisrc_action):
    git_server.add_qibuild_test_project("world")
    qisrc_action("init", git_server.manifest_url)
    build_worktree = TestBuildWorkTree()
    assert build_worktree.get_build_project("world")
開發者ID:cameronyoyos,項目名稱:qibuild,代碼行數:7,代碼來源:test_fixture.py


注:本文中的qibuild.test.conftest.TestBuildWorkTree.get_build_project方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。