#!/usr/bin/env bash

source vars

args=
single_test=0
persist_set=0
unconfigure_set=0
debug_set=0
vppsrc=
ginkgo_args=
parallel=

for i in "$@"
do
case "${i}" in
    --persist=*)
        persist="${i#*=}"
        if [ $persist = "true" ]; then
            args="$args -persist"
            persist_set=1
        fi
        ;;
    --debug=*)
        debug="${i#*=}"
        if [ $debug = "true" ]; then
            args="$args -debug"
            debug_set=1
        fi
        ;;
    --verbose=*)
        verbose="${i#*=}"
        if [ $verbose = "true" ]; then
            args="$args -verbose"
        fi
        ;;
    --unconfigure=*)
        unconfigure="${i#*=}"
        if [ $unconfigure = "true" ]; then
            args="$args -unconfigure"
            unconfigure_set=1
        fi
        ;;
    --cpus=*)
        args="$args -cpus ${i#*=}"
        ;;
    --vppsrc=*)
        args="$args -vppsrc ${i#*=}"
        ;;
    --test=*)
        tc_name="${i#*=}"
        if [ $tc_name != "all" ]; then
            single_test=1
            ginkgo_args="$ginkgo_args --focus $tc_name -vv"
            args="$args -verbose"
        else
            ginkgo_args="$ginkgo_args -v"
        fi
        ;;
    --parallel=*)
        ginkgo_args="$ginkgo_args -procs=${i#*=}"
        ;;
    --repeat=*)
        ginkgo_args="$ginkgo_args --repeat=${i#*=}"
        ;;
esac
done

if [ $single_test -eq 0 ] && [ $persist_set -eq 1 ]; then
    echo "persist flag is not supported while running all tests!"
    exit 1
fi

if [ $unconfigure_set -eq 1 ] && [ $single_test -eq 0 ]; then
    echo "a single test has to be specified when unconfigure is set"
    exit 1
fi

if [ $persist_set -eq 1 ] && [ $unconfigure_set -eq 1 ]; then
    echo "setting persist flag and unconfigure flag is not allowed"
    exit 1
fi

if [ $single_test -eq 0 ] && [ $debug_set -eq 1 ]; then
    echo "VPP debug flag is not supperted while running all tests!"
    exit 1
fi

sudo -E go run github.com/onsi/ginkgo/v2/ginkgo --trace $ginkgo_args -- $args
