#!/usr/bin/env bash # Runs the two-goal experiment in eight separate JVMs and collects the first figure from each. # Run from the repository root. set -euo pipefail out=embabel/output/24-two-goals-across-jvms.txt tmp=$(mktemp) for i in 1 2 3 4 5 6 7 8; do mvn -B -q test -pl embabel -Dtest='TestingLayersTest#askingATwoGoalAgentForOneOfTheGoals' "$@" > /dev/null echo "JVM $i | equal goals: $(sed -n 's/^TwoGoalsAgent.*produced in //p' embabel/output/16-two-goals.txt) | valued goal: $(sed -n 's/^Same.*produced in //p' embabel/output/16-two-goals.txt)" >> "$tmp" done { echo "Asked for a Brief, 50 runs per JVM, eight JVMs in a row (scripts/two-goals-across-jvms.sh)."; echo; cat "$tmp"; } > "$out" rm "$tmp"