#!/bin/bash set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$SCRIPT_DIR/../.." # Test where Go node joins to OCaml node (reverse direction) echo "Starting OCaml SWIM server..." cd "$REPO_ROOT" timeout 25 ./_build/default/bin/interop_test.exe & OCAML_PID=$! sleep 2 echo "Starting Go memberlist and joining to OCaml..." cd "$REPO_ROOT/interop" ./memberlist-server -name go-node -port 7946 -join "127.0.0.1:7947" & GO_PID=$! # Let them communicate for a while sleep 15 echo "Killing processes..." kill $GO_PID 2>/dev/null || true kill $OCAML_PID 2>/dev/null || true wait $GO_PID 2>/dev/null || true wait $OCAML_PID 2>/dev/null || true echo "Done"