The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(scripts): run json-rpc e2e suites across split test targets
Steven Enamakel7328c67c259d
diff --git a/scripts/test-rust-e2e.sh b/scripts/test-rust-e2e.shindex 723cba2ee0..972ce75f56 100755--- a/scripts/test-rust-e2e.sh+++ b/scripts/test-rust-e2e.sh@@ -263,28 +263,28 @@ run_json_rpc_e2e_suite() {# failed to compile listed nothing, the loop ran zero times, and the suite# reported success. A listing that fails part-way is refused whole, so a# partial list is never run as though it were complete.- local listing test_names test_name- if ! listing="$(- "$CARGO_BIN" test --manifest-path Cargo.toml --features "$PRODUCT_FEATURES" \- --test json_rpc_e2e -- --list- )"; then- echo "[rust-e2e] ERROR: could not enumerate json_rpc_e2e tests; refusing to run an empty or partial list." >&2- return 1- fi-- test_names="$(printf '%s\n' "$listing" | sed -n 's/: test$//p')"- if [ -z "$test_names" ]; then- echo "[rust-e2e] ERROR: json_rpc_e2e enumeration returned no tests; refusing to report success." >&2- return 1- fi-- while IFS= read -r test_name; do- echo "[rust-e2e] $CARGO_BIN test --manifest-path Cargo.toml --test json_rpc_e2e $test_name"- bash "$SCRIPT_DIR/ci-cancel-aware.sh" "$CARGO_BIN" test \- --manifest-path Cargo.toml --features "$PRODUCT_FEATURES" \- --test json_rpc_e2e "$test_name" -- \- --exact --test-threads=1 ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"}- done <<<"$test_names"+ local target listing test_names test_name+ local -a targets=(json_rpc_threads_e2e json_rpc_wallet_e2e json_rpc_flows_e2e+ json_rpc_mcp_e2e json_rpc_inference_e2e json_rpc_auth_security_e2e+ json_rpc_config_e2e json_rpc_agent_team_e2e json_rpc_web_chat_e2e+ json_rpc_misc_e2e)+ for target in "${targets[@]}"; do+ if ! listing="$("$CARGO_BIN" test --manifest-path Cargo.toml --features "$PRODUCT_FEATURES" --test "$target" -- --list)"; then+ echo "[rust-e2e] ERROR: could not enumerate ${target}; refusing to run an empty or partial list." >&2+ return 1+ fi+ test_names="$(printf '%s\n' "$listing" | sed -n 's/: test$//p')"+ if [ -z "$test_names" ]; then+ echo "[rust-e2e] ERROR: ${target} enumeration returned no tests; refusing to report success." >&2+ return 1+ fi+ while IFS= read -r test_name; do+ echo "[rust-e2e] $CARGO_BIN test --manifest-path Cargo.toml --test ${target} ${test_name}"+ bash "$SCRIPT_DIR/ci-cancel-aware.sh" "$CARGO_BIN" test --manifest-path Cargo.toml \+ --features "$PRODUCT_FEATURES" --test "$target" "$test_name" -- \+ --exact --test-threads=1 ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"}+ done <<<"$test_names"+ done}run_in_process_modules() {@@ -295,7 +295,7 @@ run_in_process_modules() {while IFS= read -r module; do[ -n "$module" ] || continueecho "[rust-e2e] in_process module: ${module}"- if [ "$module" = "config_auth_app_state_connectivity_e2e" ]; then+ if [[ "$module" =~ ^(config|auth|app_state|connectivity)_e2e$ ]]; then# These RPC fixtures share process-global credential and listener state;# serialize them so one test cannot drop another test's ephemeral server.bash "$SCRIPT_DIR/ci-cancel-aware.sh" "$CARGO_BIN" test \diff --git a/scripts/test-rust-with-mock.sh b/scripts/test-rust-with-mock.shindex 5ecb7cd107..885bb28f5a 100755--- a/scripts/test-rust-with-mock.sh+++ b/scripts/test-rust-with-mock.sh@@ -269,7 +269,7 @@ run_in_process_modules() {while IFS= read -r module; do[ -n "$module" ] || continueecho "[test-rust-with-mock] in-process module: ${module}"- if [ "$module" = "config_auth_app_state_connectivity_e2e" ]; then+ if [[ "$module" =~ ^(config|auth|app_state|connectivity)_e2e$ ]]; then# RPC fixtures in this module bind ephemeral listeners and mutate# process-wide credential state; parallel tests can tear down a peer's# listener before its final auth call.@@ -286,21 +286,28 @@ run_json_rpc_e2e() {# The JSON-RPC E2E binary intentionally changes process-global environment# and runtime configuration. Run each case in a fresh test process so a# provider route persisted by one scenario cannot affect another one.- local listing test_names test_name- if ! listing="$(cargo_test --test json_rpc_e2e -- --list)"; then- echo "[test-rust-with-mock] ERROR: could not enumerate json_rpc_e2e tests; refusing an empty or partial list." >&2- return 1- fi- test_names="$(printf '%s\n' "$listing" | sed -n 's/: test$//p')"- if [ -n "${JSON_RPC_E2E_FILTER:-}" ]; then test_names="$(printf "%s\n" "$test_names" | grep -- "$JSON_RPC_E2E_FILTER" || true)"; fi- if [ -z "$test_names" ]; then- echo "[test-rust-with-mock] ERROR: json_rpc_e2e enumeration returned no tests." >&2- return 1- fi- while IFS= read -r test_name; do- echo "[test-rust-with-mock] JSON-RPC E2E test: ${test_name}"- cargo_test --test json_rpc_e2e "$test_name" -- --exact --test-threads=1 "$@"- done <<<"$test_names"+ local target listing test_names test_name+ local -a targets=(json_rpc_threads_e2e json_rpc_wallet_e2e json_rpc_flows_e2e+ json_rpc_mcp_e2e json_rpc_inference_e2e json_rpc_auth_security_e2e+ json_rpc_config_e2e json_rpc_agent_team_e2e json_rpc_web_chat_e2e+ json_rpc_misc_e2e)+ for target in "${targets[@]}"; do+ if ! listing="$(cargo_test --test "$target" -- --list)"; then+ echo "[test-rust-with-mock] ERROR: could not enumerate ${target}; refusing an empty or partial list." >&2+ return 1+ fi+ test_names="$(printf '%s\n' "$listing" | sed -n 's/: test$//p')"+ if [ -n "${JSON_RPC_E2E_FILTER:-}" ]; then test_names="$(printf "%s\n" "$test_names" | grep -- "$JSON_RPC_E2E_FILTER" || true)"; fi+ if [ -z "$test_names" ]; then+ if [ -n "${JSON_RPC_E2E_FILTER:-}" ]; then continue; fi+ echo "[test-rust-with-mock] ERROR: ${target} enumeration returned no tests." >&2+ return 1+ fi+ while IFS= read -r test_name; do+ echo "[test-rust-with-mock] JSON-RPC E2E test: ${test_name} (${target})"+ cargo_test --test "$target" "$test_name" -- --exact --test-threads=1 "$@"+ done <<<"$test_names"+ done}run_build_only_reaper_test() {