def test_several_qibuild_projects(args, build_worktree, monkeypatch): """ Test Several QiBuild Projects """ world_proj = build_worktree.add_test_project("world") test_proj = build_worktree.add_test_project("testme") world_proj.configure() test_proj.configure() monkeypatch.chdir(build_worktree.root) args.projects = ["world", "testme"] test_runners = qitest.parsers.get_test_runners(args) assert len(test_runners) == 2 world_runner, testme_runner = test_runners assert world_runner.project.sdk_directory == world_proj.sdk_directory assert testme_runner.project.sdk_directory == test_proj.sdk_directory
def test_nothing_specified_inside_qibuild_project(args, build_worktree, monkeypatch): """ Test Nothing Specified Inside QiBuild Project """ world_proj = build_worktree.add_test_project("world") world_proj.configure() monkeypatch.chdir(world_proj.path) test_runners = qitest.parsers.get_test_runners(args) assert len(test_runners) == 1 test_runner = test_runners[0] assert test_runner.project.sdk_directory == world_proj.sdk_directory
def test_qitest_json_from_worktree(args, build_worktree, monkeypatch): """ Test QiTest JSON From WorkTree """ testme_proj = build_worktree.add_test_project("testme") testme_proj.configure() monkeypatch.chdir(testme_proj.path) qitest_json = os.path.join(testme_proj.sdk_directory, "qitest.json") args.qitest_jsons = [qitest_json] test_runners = qitest.parsers.get_test_runners(args) assert len(test_runners) == 1 test_runner = test_runners[0] assert test_runner.cwd == testme_proj.sdk_directory