Ejemplo n.º 1
0
def test_library_name():
    """ Test Library Name """
    assert library_name("foo", debug=False, shared=True, os_name="Windows") == "foo.dll"
    assert library_name("foo", debug=True, shared=True, os_name="Windows") == "foo_d.dll"
    assert library_name("foo", debug=False, shared=False, os_name="Windows") == "foo.lib"
    assert library_name("foo", debug=True, shared=False, os_name="Windows") == "foo_d.lib"
    assert library_name("foo", shared=True, os_name="Linux") == "libfoo.so"
    assert library_name("foo", shared=False, os_name="Linux") == "libfoo.a"
    assert library_name("foo", shared=True, os_name="Darwin") == "libfoo.dylib"
    assert library_name("foo", shared=False, os_name="Darwin") == "libfoo.a"
Ejemplo n.º 2
0
def test_library_name():
    """ Test Library Name """
    assert library_name("foo", debug=False, shared=True, os_name="Windows") == "foo.dll"
    assert library_name("foo", debug=True, shared=True, os_name="Windows") == "foo_d.dll"
    assert library_name("foo", debug=False, shared=False, os_name="Windows") == "foo.lib"
    assert library_name("foo", debug=True, shared=False, os_name="Windows") == "foo_d.lib"
    assert library_name("foo", shared=True, os_name="Linux") == "libfoo.so"
    assert library_name("foo", shared=False, os_name="Linux") == "libfoo.a"
    assert library_name("foo", shared=True, os_name="Darwin") == "libfoo.dylib"
    assert library_name("foo", shared=False, os_name="Darwin") == "libfoo.a"
Ejemplo n.º 3
0
def test_library_name():
    assert library_name("foo", debug=False, shared=True,  os_name="Windows") == "foo.dll"
    assert library_name("foo", debug=True,  shared=True,  os_name="Windows") == "foo_d.dll"
    assert library_name("foo", debug=False, shared=False, os_name="Windows") == "foo.lib"
    assert library_name("foo", debug=True,  shared=False, os_name="Windows") == "foo_d.lib"

    assert library_name("foo", shared=True,  os_name="Linux") == "libfoo.so"
    assert library_name("foo", shared=False, os_name="Linux") == "libfoo.a"

    assert library_name("foo", shared=True,  os_name="Mac") == "libfoo.dylib"
    assert library_name("foo", shared=False, os_name="Mac") == "libfoo.a"
Ejemplo n.º 4
0
def test_find_target_in_build_dir(qibuild_action, record_messages):
    """ Test Find Target In Build Dir """
    qibuild_action.add_test_project("world")
    qibuild_action.add_test_project("hello")
    qibuild_action("configure", "hello")
    qibuild_action("make", "hello")
    record_messages.reset()
    qibuild_action("find", "hello", "world")
    assert record_messages.find(find.library_name("world"))
    rc = qibuild_action("find", "hello", "libworld", retcode=True)
    assert rc == 1
Ejemplo n.º 5
0
def test_find_target_in_toolchain_package(cd_to_tmpdir, record_messages):
    """ Test Find Target In Toolchain Package """
    qibuild_action = QiBuildAction()
    qitoolchain_action = QiToolchainAction()
    qibuild_action.add_test_project("world")
    qibuild_action.add_test_project("hello")
    world_package = qibuild_action("package", "world")
    qitoolchain_action("create", "foo")
    qibuild.config.add_build_config("foo", toolchain="foo")
    qitoolchain_action("add-package", "-c", "foo", world_package)
    qibuild_action.chdir("hello")
    qibuild_action("configure", "-c", "foo")
    qibuild_action("make", "-c", "foo")
    record_messages.reset()
    qibuild_action("find", "world", "-c", "foo")
    assert record_messages.find(find.library_name("world"))
    record_messages.reset()
    qibuild_action("find", "hello", "-c", "foo")
    assert record_messages.find(find.binary_name("hello"))
    rc = qibuild_action("find", "libeggs", "-c", "foo", retcode=True)
    assert rc == 1