#!/bin/bash
#
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if [[ -z "${ROOTDIR}" ]]; then
    echo "Source build/setup.sh first"
    exit 1
fi

function die {
  echo "$@" >/dev/stderr
  exit 1
}

function usage {
  cat <<EOF
Usage: fpga_test.sh [options] <fpga-board-number> <test-suite-filename>

Where [options] is one of:

    --no-echo-check    Disables the checks for echoed back characters
                       from the FPGA shell prompt.
    --timeout NN       Sets the length of time to wait for a response
                       on read or write to the UART. Defaults to 60
                       seconds.
    --robot PATH       Overrides the path to the robot test script
                       runner. Defaults to searching the PATH.
    --help | -h        Show this usage information.

fpga-board-number must be a two digit number, prefixed with a leading
zero if necessary.

test-suite-filename is the path to the test suite to run.
Ie: sim/tests/shodan_boot.robot.

Note: options are positional -- fpga-board-number and test-suite-filename
must be the last arguments on the command line, in that order.
EOF
  exit 1
}

ROBOT=$(which robot)
TESTS_ROOT="${ROOTDIR}/sim/tests"
FPGA_HEADER="${TESTS_ROOT}/fpga_header.robot"

export PLATFORM="nexus"

ARGS=()

if [[ "$1" == "--platform" ]]; then
  shift
  export PLATFORM="$1"
fi

if [[ "$1" == "--no-echo-check" ]]; then
  shift
  ARGS+=(--variable "WAIT_ECHO:false")
fi

if [[ "$1" == "--timeout" ]]; then
  shift
  ARGS+=(--variable "LOG_TIMEOUT:$1")
  shift
fi

if [[ "$1" == "--robot" ]]; then
  shift
  ROBOT="$1"
  shift
fi

if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
  usage
fi

NEXUS_ID="${1}"
ARGS+=(--variable "NEXUS_ID:${NEXUS_ID}")
shift
TEST_SUITE="$1"
shift

if [[ -z "${TEST_SUITE}" ]]; then
  echo "No FPGA number or test suite specified." >/dev/stderr
  echo >/dev/stderr
  usage
fi

if [[ ! -z "$1" ]]; then
  die "Unknown argument $1"
fi

TARGETDIR="${ROOTDIR}/out/fpga/${PLATFORM}"
mkdir -p "${TARGETDIR}"
cp -r "${TESTS_ROOT}"/* "${TARGETDIR}"
cat "${FPGA_HEADER}" "${TEST_SUITE}" > "${TARGETDIR}"/tests.robot
pushd "${TARGETDIR}"
echo "${ROBOT}" "${ARGS[@]}" tests.robot
"${ROBOT}" "${ARGS[@]}" tests.robot || exit 1

