Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
docs(cua-driver): correct headless protocol test examples (#3838)
injaneity6d5e1db7243d
diff --git a/.github/scripts/tests/test_documented_cargo_targets.py b/.github/scripts/tests/test_documented_cargo_targets.pynew file mode 100644index 0000000000..3da6e3dceb--- /dev/null+++ b/.github/scripts/tests/test_documented_cargo_targets.py@@ -0,0 +1,31 @@+import json+from pathlib import Path+import shlex+import subprocess++import pytest+++ROOT = Path(__file__).resolve().parents[3]++[email protected]("document", ["TESTING.md", "libs/cua-driver/rust/README.md"])+def test_documented_integration_targets_exist(document):+ metadata = json.loads(subprocess.check_output(+ ["cargo", "metadata", "--no-deps", "--format-version", "1", "--locked"],+ cwd=ROOT / "libs/cua-driver/rust",+ text=True,+ ))+ targets = {+ package["name"]: {target["name"] for target in package["targets"] if "test" in target["kind"]}+ for package in metadata["packages"]+ }+ commands = [+ shlex.split(line) for line in (ROOT / document).read_text().splitlines()+ if line.startswith("cargo test ") and "--test" in line+ ]+ assert commands, f"no integration test examples found in {document}"+ for command in commands:+ package = command[command.index("-p") + 1]+ requested = {target for flag, target in zip(command, command[1:]) if flag == "--test"}+ assert requested and requested <= targets[package], commanddiff --git a/.github/workflows/ci-test-scripts.yml b/.github/workflows/ci-test-scripts.ymlindex ea8169036c..851bc49ef8 100644--- a/.github/workflows/ci-test-scripts.yml+++ b/.github/workflows/ci-test-scripts.yml@@ -4,6 +4,10 @@ on:pull_request:paths:- ".github/scripts/**"+ - "TESTING.md"+ - "libs/cua-driver/rust/README.md"+ - "libs/cua-driver/rust/**/Cargo.toml"+ - "libs/cua-driver/rust/crates/*/tests/**"- ".github/release-attribution-config.json"- ".github/release-manifest.schema.json"- ".github/release-backfill/**"diff --git a/TESTING.md b/TESTING.mdindex e58a513c96..f82974f748 100644--- a/TESTING.md+++ b/TESTING.md@@ -52,7 +52,7 @@ Run from `libs/cua-driver/rust`. Focused examples:```bashcargo test -p cua-driver-core --locked-cargo test -p cua-driver --test protocol_mcp_test --locked+cargo test -p cua-driver --test protocol_schema_test --locked```Linux source and package checks run through Nix. Windows and Linux compile gatesdiff --git a/libs/cua-driver/rust/README.md b/libs/cua-driver/rust/README.mdindex 47070041b5..7a630e741e 100644--- a/libs/cua-driver/rust/README.md+++ b/libs/cua-driver/rust/README.md@@ -54,7 +54,7 @@ Default tests should be headless and safe for CI:```bashcargo test -p cua-driver-core-cargo test -p cua-driver --test protocol_mcp_test+cargo test -p cua-driver --test protocol_schema_test```GUI and VM-backed tests are marked `#[ignore]` and require harness apps from