INNER CODE UNIT · Python

test_commands

alper-han/CrossMacro · scripts/ci/run-tests.py:40

def test_commands(platform, root):
    for suite in COMMON + [f"Platform.{platform}", "UI"]:
        project = f"CrossMacro.{suite}.Tests"
        result_dir = root / "artifacts" / "test-results" / platform / suite
        args = ["dotnet", "test", str(root / "tests" / project / f"{project}.csproj"),
                "--configuration", "Debug", "--no-build", "--no-restore", "--verbosity", "minimal",
                "--logger", "trx;LogFileName=results.trx", "--results-directory", str(result_dir),
                "--blame-hang", "--blame-hang-timeout", "2m", "--blame-hang-dump-type", "mini"]
        env = dict(os.environ)
        if suite == "Infrastructure":
            env["CROSSMACRO_PROCESS_INTEGRATION_TESTS"] = "1"
        if suite == "Platform.Linux":
            env["CROSSMACRO_DBUS_INTEGRATION_TESTS"] = "1"
            args = ["dbus-run-session", "--"] + args
        yield args, env
        if suite == "Daemon" and platform == "Linux":
            env = dict(env, CROSSMACRO_DAEMON_INTEGRATION_TESTS="1")
            nss = args.copy()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…