Example #1
0
def engine_instance(request, _build_dir):
    instance = EngineInstance("test", os.path.join(ROOT_DIR, "bin"),
                              os.path.join(ROOT_DIR, "externals/build"))
    global instance_counter

    port = 4444 + (instance_counter * 2)
    instance_counter += 1

    instance.run_develop(
        os.path.join(ROOT_DIR, "engine", "test", "data", "build"),
        os.path.join(ROOT_DIR, "engine", "test", "data", "src"),
        core_dir=os.path.join(ROOT_DIR, "core"),
        port=port,
        protocol="tcp",
    )

    while not instance.ready:
        pass

    api = instance.console_api

    yield api

    api.quit()
    instance.kill()
Example #2
0
def _build_dir(tmpdir_factory):
    instance = EngineInstance("compile test", os.path.join(ROOT_DIR, "bin"),
                              os.path.join(ROOT_DIR, "externals/build"))

    global instance_counter

    build_dir = os.path.join(ROOT_DIR, "engine", "test", "data", "build"),

    port = 4444 + (instance_counter * 2)
    instance_counter += 1

    instance.run_develop(build_dir,
                         os.path.join(ROOT_DIR, "engine", "test", "data",
                                      "src"),
                         core_dir=os.path.join(ROOT_DIR, "core"),
                         compile_=True,
                         check=True,
                         port=port,
                         lock=False)

    return build_dir