srobo / tasks

Collects all the tasks which we want to work on.
https://github.com/srobo/tasks/issues
1 stars 0 forks source link

Rehearse knockouts running #687

Closed PeterJCLaw closed 3 years ago

PeterJCLaw commented 3 years ago

It would be great to have a run-through of:

WillB97 commented 3 years ago

I have run a test against the friendlies compstate and have a crude script for this (run from competition-simulator directory):

#!/bin/bash -ex
# Usage: ./run-knockout.sh <compstate> <archives>

run_round() {  # compstate archives match_nums
    srcomp for-each-match "$1" "$3" -- ./script/run-comp-match "$2" @NUMBER @TLAS --duration 5
    # move match files
    OIFS=$IFS
    IFS=','
    for i in $3; do
        cp "$2/matches/$i.yaml" "$1/knockout/Simulator/$i.yaml"
    done
    IFS=$OIFS
}

mkdir -p "$1/knockout/Simulator/"

run_round $1 $2 10100,10101,10102,10103
run_round $1 $2 10104,10105
run_round $1 $2 10106
PeterJCLaw commented 3 years ago

Aha, nice. A small thought -- is there any need for the loop in the script? Surely * could be used in place of the filenames?