Files
allwpilib/test-scripts/spawn_driver_station.sh
Jonathan Leitschuh 47169e0ce1 Adds test scripts to deploy, run and retrieve results from integration tests.
Adds a simple script for jenkins to run to retrieve the test results from.
Adds a script that allows developers to download and run tests from a specific language easily.
Adds a script that allows the tests to be run from within an ssh session on the roborio.

Change-Id: Ibe6ddc4e1dcbb8192e6552c3901e96f6907a8020
2014-08-26 11:20:02 -04:00

36 lines
1.2 KiB
Bash

#!/usr/bin/env bash
#*----------------------------------------------------------------------------*#
#* Copyright (c) FIRST 2014. All Rights Reserved. *#
#* Open Source Software - may be modified and shared by FRC teams. The code *#
#* must be accompanied by the FIRST BSD license file in the root directory of *#
#* the project. *#
#*----------------------------------------------------------------------------*#
source config.sh
TESTSTAND_SERVE_COMMAND=".scratch/teststand serve"
#Checks to see if the mutex driver station is running. If it isn't then start it.
SSH_CHECK_FOR_TESTSTAND="ssh -qn ${ROBOT_ADDRESS} 'pidof ${TESTSTAND_SERVE_COMMAND}' &>/dev/null"
if [ $(which sshpass) ]; then
SSH_CHECK_FOR_TESTSTAND="sshpass -p '' ${SSH_CHECK_FOR_TESTSTAND}"
fi
echo $SSH_CHECK_FOR_TESTSTAND
if $(eval $SSH_CHECK_FOR_TESTSTAND); then
echo "Driver STation is already running";
exit 0;
fi
echo "Starting Driver Station";
SSH_START_TESTSTAND_DRIVER_STATION="ssh ${ROBOT_ADDRESS} '${TESTSTAND_SERVE_COMMAND}'"
if [ $(which sshpass) ]; then
sshpass -p "" ${SSH_START_TESTSTAND_DRIVER_STATION} &
else
eval ${SSH_START_TESTSTAND_DRIVER_STATION} &
fi