mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
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
This commit is contained in:
36
test-scripts/spawn_driver_station.sh
Normal file
36
test-scripts/spawn_driver_station.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user