Files
coucou/scripts/test-android-link.sh
Claude 225dad7cb5 Android link (Mac): protocol v1 rules, admission, hub and certificate, with tests
The pure part of the desktop side of docs/ANDROID_LINK.md in Swift: pairing link,
fingerprints, TXT record, framing, the admission rules of admission.rs, the hub that
applies a decision only to the request still pending, and the self-signed certificate.
scripts/test-android-link.sh checks them against the Rust and Kotlin vectors; CI runs it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMLAfoARhk8bXPKnZ2p5MG
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-03 09:25:40 +00:00

14 lines
789 B
Bash
Executable File

#!/usr/bin/env bash
# The Mac side of the Android link (docs/ANDROID_LINK.md) against the vectors of the Windows/Linux
# server and the Android client: pairing link, fingerprints, TXT record, framing, admission, the hub's
# approval and question rules, the certificate. Pure files only: no socket, no Keychain, no AppState.
set -euo pipefail
cd "$(dirname "$0")/.."
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-android-link.XXXXXX")"
trap 'rm -rf "$TEST_DIR"' EXIT
LINK=NotchBuddy/Sources/App/AndroidLink
swiftc -swift-version 6 -strict-concurrency=complete \
$LINK/AndroidLinkProtocol.swift $LINK/AndroidLinkAdmission.swift $LINK/AndroidLinkHub.swift \
$LINK/AndroidLinkIdentity.swift tests/AndroidLinkTests.swift -o "$TEST_DIR/android-link-tests"
"$TEST_DIR/android-link-tests"