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:
Jonathan Leitschuh
2014-08-26 11:20:02 -04:00
parent 4ef798a0c0
commit 47169e0ce1
12 changed files with 1144 additions and 41 deletions

381
test-scripts/README.html Normal file
View File

@@ -0,0 +1,381 @@
<!DOCTYPE html><html><head><meta charset="utf-8"><style>/* Fonts */
@font-face{
font-family: octicons-anchor;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIg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yjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff');
}
@font-face{
font-family: fontawesome-mini;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAzUABAAAAAAFNgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABwAAAAcZMzaOEdERUYAAAGIAAAAHQAAACAAOQAET1MvMgAAAagAAAA+AAAAYHqhde9jbWFwAAAB6AAAAFIAAAFa4azkLWN2dCAAAAI8AAAAKAAAACgFgwioZnBnbQAAAmQAAAGxAAACZVO0L6dnYXNwAAAEGAAAAAgAAAAIAAAAEGdseWYAAAQgAAAFDgAACMz7eroHaGVhZAAACTAAAAAwAAAANgWEOEloaGVhAAAJYAAAAB0AAAAkDGEGa2htdHgAAAmAAAAAEwAAADBEgAAQbG9jYQAACZQAAAAaAAAAGgsICJBtYXhwAAAJsAAAACAAAAAgASgBD25hbWUAAAnQAAACZwAABOD4no+3cG9zdAAADDgAAABsAAAAmF+yXM9wcmVwAAAMpAAAAC4AAAAusPIrFAAAAAEAAAAAyYlvMQAAAADLVHQgAAAAAM/u9uZ4nGNgZGBg4ANiCQYQYGJgBEJuIGYB8xgABMMAPgAAAHicY2Bm42OcwMDKwMLSw2LMwMDQBqGZihmiwHycoKCyqJjB4YPDh4NsDP+BfNb3DIuAFCOSEgUGRgAKDgt4AAB4nGNgYGBmgGAZBkYGEAgB8hjBfBYGCyDNxcDBwMTA9MHhQ9SHrA8H//9nYACyQyFs/sP86/kX8HtB9UIBIxsDXICRCUgwMaACRoZhDwA3fxKSAAAA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rcKt5oVxnptHR9JS8ehVUd5wvvahN2uqxOOpMXapibI5k7Zwbt4xBSaTfoKBufhAnO/uqNcfK8OTs0OQ6l7JIqFjDhYj5WcjevCnI/1DDiI8j4ndWb/5YzDZWh79yomWXeXj7Nnw70/2TIeFPTrlSh89k1ObOSRVZWZfgF0r/zJQB4nG2JUQuCQBCEd07TTg36fb2IyBaLd3vWaUh/vmSJnvpgmG8YcmS8X3Shf3R7QA4OBUocUKHGER5NNbOOEvwc1txnuWkTRb/aPjimJ5vXabI+3VfOiyS15UWvyezM2xiGOPyuMohOH8O8JiO4Af+FsAGNAEuwCFBYsQEBjlmxRgYrWCGwEFlLsBRSWCGwgFkdsAYrXFhZsBQrAAA=) format('woff');
}
/* Body */
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body{
color:#4d4d4c;
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman',
"Hiragino Sans GB", "STXihei", "微软雅黑", serif;
font-size:12px;
line-height:1.5em;
background:#fefefe;
width: 45em;
margin: 10px auto;
padding: 30px;
border: 1px solid #ddd;
outline: 1300px solid #f8f8f8;
}
/* Links */
a{ color: #06d; text-decoration:none; }
a:hover{ color: #06e; text-decoration: underline; }
a:active{ color:#faa700; }
a:focus{ outline: thin dotted; }
a:hover, a:active{ outline: 0; }
::-moz-selection { background:#a8d1ff; color:#000 }
::selection { background:#a8d1ff; color:#000 }
a::-moz-selection { background:#a8d1ff; color:#0645ad }
a::selection { background:#a8d1ff; color:#0645ad }
/* Header Anchor Links*/
.headeranchor-link {
color:#111;
border: 0;
margin-left: -20px;
padding-right: 6px;
cursor: pointer;
position: absolute;
display: block;
top: 0;
left: 0;
bottom: 0;
}
.headeranchor {
font: normal normal 16px octicons-anchor;
line-height: 1;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.headeranchor-link:hover,
.headeranchor-link:visited,
.headeranchor-link:active
{ text-decoration: none; color:#4d4d4c; }
.headeranchor-link:hover .headeranchor:before,
h1:hover .headeranchor:before,
h2:hover .headeranchor:before,
h3:hover .headeranchor:before,
h4:hover .headeranchor:before,
h5:hover .headeranchor:before,
h6:hover .headeranchor:before
{ content: '\f05c'; }
abbr { cursor: pointer; }
/* Paragraphs */
p { margin:1em 0; }
/* Images */
img {
max-width:100%;
border: 0;
-ms-interpolation-mode: bicubic;
vertical-align: middle;
}
/* Headers */
h1,h2,h3,h4,h5,h6 {
font-weight:normal;
color:#111;
line-height: 1.7;
position: relative;
}
h4,h5,h6{ font-weight: bold; }
h1 { font-size:2.5em; border-bottom: 1px solid #ddd;}
h2 { font-size:2em; border-bottom:1px solid #eee; padding-bottom: 5px; }
h3 { font-size:1.5em; }
h4 { font-size:1.2em; }
h5 { font-size:1em; }
h6 { font-size:0.9em; }
/* Block Quotes */
blockquote {
color:#666666;
margin:0;
padding-left: 3em;
border-left: 0.5em #EEE solid;
}
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
/* Raw Blocks */
pre, code, kbd, samp {
color: #000;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 0.88em;
background-color: #F8F8F8;
border: 1px solid #CCC;
}
pre {
padding: 10px;
overflow: auto;
}
code { padding: 0 3px 0 3px; }
pre code { border: 0; padding: 0; }
/* Admonition */
.admonition {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 0.88em;
padding: 0.5em 1em 0.5em 1em;
margin: 10px auto;
color: #888888;
background-color: #F8F8F8;
border: 1px solid #888888;
}
.admonition p { padding: 0; margin: 0; }
.admonition-title { font-weight: bold; margin: 0; }
.admonition-icon {
font: normal normal 16px fontawesome-mini;
line-height: 1.5;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
float: left;
}
.admonition.attention { color: #4F8A10; background-color: #DFF2BF; border: 1px solid #4F8A10; }
.admonition.caution { color: #D63301; background-color: #FFCCBA; border: 1px solid #D63301; }
.admonition.hint { color: #00529B; background-color: #BDE5F8; border: 1px solid #00529B; }
.admonition.danger { color: #D8000C; background-color: #FFBABA; border: 1px solid #D8000C; }
.admonition.question { color: #00049b; background-color: #BDC8F8; border: 1px solid #00049b; }
.admonition.note { color: #9F6000; background-color: #FEEFB3; border: 1px solid #9F6000; }
.attention > .admonition-icon:before { content: "\f058\00a0"; }
.caution > .admonition-icon:before { content: "\f06a\00a0"; }
.hint > .admonition-icon:before { content: "\f05a\00a0"; }
.danger > .admonition-icon:before { content: "\f056\00a0"; }
.question > .admonition-icon:before { content: "\f059\00a0"; }
.note > .admonition-icon:before { content: "\f040\00a0"; }
/* progress bar*/
.progress {
display: block;
width: 300px;
margin: 10px 0;
height: 24px;
border: 1px solid #ccc;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #F8F8F8;
position: relative;
box-shadow: inset -1px 1px 3px rgba(0, 0, 0, .1);
}
.progress-label {
position: absolute;
text-align: center;
font-weight: bold;
width: 100%; margin: 0;
line-height: 24px;
color: #333;
text-shadow:
1px 1px 0px #fefefe,
-1px -1px 0px #fefefe,
-1px 1px 0px #fefefe,
1px -1px 0px #fefefe,
0px 1px 0px #fefefe,
0px -1px 0px #fefefe,
1px 0px 0px #fefefe,
-1px 0px 0px #fefefe,
1px 1px 2px #000;
-webkit-font-smoothing: antialiased !important;
white-space: nowrap;
overflow: hidden;
}
.progress-bar {
height: 24px;
float: left;
border-right: 1px solid #ccc;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #34c2e3;
box-shadow: inset 0 1px 0px rgba(255, 255, 255, .5);
background-size: 30px 30px;
background-image: -webkit-linear-gradient(
135deg,
rgba(255, 255, 255, .4) 27%, transparent 27%,
transparent 53%, rgba(255, 255, 255, .4) 53%,
rgba(255, 255, 255, .4) 77%, transparent 77%,
transparent
);
background-image: -moz-linear-gradient(
135deg,
rgba(255, 255, 255, .4) 27%, transparent 27%,
transparent 53%, rgba(255, 255, 255, .4) 53%,
rgba(255, 255, 255, .4) 77%, transparent 77%,
transparent
);
background-image: -ms-linear-gradient(
135deg,
rgba(255, 255, 255, .4) 27%, transparent 27%,
transparent 53%, rgba(255, 255, 255, .4) 53%,
rgba(255, 255, 255, .4) 77%, transparent 77%,
transparent
);
background-image: -o-linear-gradient(
135deg,
rgba(255, 255, 255, .4) 27%, transparent 27%,
transparent 53%, rgba(255, 255, 255, .4) 53%,
rgba(255, 255, 255, .4) 77%, transparent 77%,
transparent
);
background-image: linear-gradient(
135deg,
rgba(255, 255, 255, .4) 27%, transparent 27%,
transparent 53%, rgba(255, 255, 255, .4) 53%,
rgba(255, 255, 255, .4) 77%, transparent 77%,
transparent
);
}
.progress-100plus .progress-bar { background-color: #1ee038; }
.progress-80plus .progress-bar { background-color: #86e01e; }
.progress-60plus .progress-bar { background-color: #f2d31b; }
.progress-40plus .progress-bar { background-color: #f2b01e; }
.progress-20plus .progress-bar { background-color: #f27011; }
.progress-0plus .progress-bar { background-color: #f63a0f; }
.gloss .progress-bar {
box-shadow:
inset -1px 1px 0px rgba(255, 255, 255, .5),
inset 0 -4px 12px rgba(255, 255, 255, .7),
inset 0 4px 12px rgba(255, 255, 255, .7),
inset 0 -12px 0px rgba(0, 0, 0, .05),
inset 1px -1px 0px rgba(255, 255, 255, .2);
}
.candystripe-animate .progress-bar{
-webkit-animation: animate-stripes 3s linear infinite;
-moz-animation: animate-stripes 3s linear infinite;
animation: animate-stripes 3s linear infinite;
}
@-webkit-keyframes animate-stripes { 0% { background-position: 0 0; } 100% { background-position: 60px 0; } }
@-moz-keyframes animate-stripes { 0% { background-position: 0 0; } 100% { background-position: 60px 0; } }
@keyframes animate-stripes { 0% { background-position: 0 0; } 100% { background-position: 60px 0; } }
/* Inlines */
b, strong { font-weight: bold; }
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
dfn { font-style: italic; }
/* Lists */
ul, ol { padding-left: 30px; }
li p:last-child { margin:0 }
.task-list-item { list-style-type: none; }
.task-list-item input { float:left; margin-left: -20px; margin-top: 6px; }
dt { font-weight: bold; font-style: italic;}
dd { margin: 0 0 0 2em; }
/* Tables */
table { width: 100%; border-collapse: collapse; overflow-x: auto; overflow-y: hidden; display: block;}
table tr { background-color: #fefefe; }
table tr:nth-child(2n) { background-color: #f8f8f8; }
td, th { border: 1px solid #ddd; padding: 6px 13px; }
/* Codehilite Tables */
.codehilitetable { border: 0; border-spacing: 0; }
.linenos, .code, .codehilitetable td { border: 0; padding: 0; }
td:not(.linenos) .linenodiv { padding: 0 !important; }
.code { width: 100%; }
.linenos div pre, .linenodiv pre {
border: 0;
border-top: 1px solid #CCC;
border-left: 1px solid #CCC;
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-border-top-left-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-moz-border-radius-topleft: 3px;
-moz-border-radius-bottomleft: 3px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.code div pre {
border: 0;
border-top: 1px solid #CCC;
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius-topright: 3px;
-moz-border-radius-bottomright: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/* Media */
@media only screen and (min-width: 480px) {
body{ font-size:14px; }
}
@media only screen and (min-width: 768px) {
body{ font-size:16px; }
}
@media print {
* { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; }
body{ font-size:12pt; max-width:100%; outline:none; border: 0;}
a, a:visited { text-decoration: underline; }
.headeranchor-link { display: none; }
hr { height: 1px; border:0; border-bottom:1px solid black; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
pre, blockquote { border: 1px solid #999; padding-right: 1em; page-break-inside: avoid; }
.progress, .progress-bar { box-shadow: none; }
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
}
</style><title>README</title></head><body><h1 id="wpilib-test-scripts"><a name="user-content-wpilib-test-scripts" href="#wpilib-test-scripts" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>WPILIB TEST SCRIPTS</h1>
<h2 id="overview"><a name="user-content-overview" href="#overview" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Overview</h2>
<p>These test scripts are designed to allow the user of the WPILib test framework to quickly and easily deploy and run their tests on the WPI roboRIO.</p>
<p>In order for the automated test system to work there is a driver station onboard the roboRIO that handles a queue of users waiting to use the driver station. All of the interaction with this queue is handled internally by test scripts contained within this file.</p>
<h2 id="running-tests"><a name="user-content-running-tests" href="#running-tests" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Running Tests</h2>
<p>See screen steps live: [TODO: Add link to screen steps live]</p></body></html>

9
test-scripts/README.md Normal file
View File

@@ -0,0 +1,9 @@
# WPILIB TEST SCRIPTS
## Overview
These test scripts are designed to allow the user of the WPILib test framework to quickly and easily deploy and run their tests on the WPI roboRIO.
In order for the automated test system to work there is a driver station onboard the roboRIO that handles a queue of users waiting to use the driver station. All of the interaction with this queue is handled internally by test scripts contained within this file.
## Running Tests
See screen steps live: [TODO: Add link to screen steps live]

38
test-scripts/config.sh Normal file
View File

@@ -0,0 +1,38 @@
#!/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. *#
#*----------------------------------------------------------------------------*#
# If this is changed, update the .gitignore
# so that test results are not commited to the repo
DEFAULT_LOCAL_TEST_RESULTS_DIR=../test-reports
ROBOT_ADDRESS=admin@roboRIO-190.local
DEFAULT_LOCAL_RUN_TEST_SCRIPT="run-tests-on-robot.sh"
DEFAULT_DESTINATION_DIR=/home/admin
DEFAULT_TEST_SCP_DIR=${DEFAULT_DESTINATION_DIR}/deployedTests
DEFAULT_DESTINATION_TEST_RESULTS_DIR=${DEFAULT_DESTINATION_DIR}/testResults
# C++ test variables
DEFAULT_CPP_TEST_NAME=FRCUserProgram
DEFAULT_CPP_TEST_ARGS="--gtest_color=yes"
DEFAULT_LOCAL_CPP_TEST_FILE=../cmake/target/cmake/wpilibc/wpilibC++IntegrationTests/FRCUserProgram
CPP_REPORT=cppreport.xml
DEFAULT_LOCAL_CPP_TEST_RESULT=${DEFAULT_LOCAL_TEST_RESULTS_DIR}/${CPP_REPORT}
DEFAULT_DESTINATION_CPP_TEST_RESULTS=${DEFAULT_DESTINATION_TEST_RESULTS_DIR}/${CPP_REPORT}
# Java test variables
DEFAULT_JAVA_TEST_NAME=FRCUserProgram.jar
DEFAULT_JAVA_TEST_ARGS=""
DEFAULT_LOCAL_JAVA_TEST_FILE=../wpilibj/wpilibJavaIntegrationTests/target/wpilibJavaIntegrationTests-0.1.0-SNAPSHOT.jar
JAVA_REPORT=javareport.xml
DEFAULT_LOCAL_JAVA_TEST_RESULT=${DEFAULT_LOCAL_TEST_RESULTS_DIR}/${JAVA_REPORT}
DEFAULT_DESTINATION_JAVA_TEST_RESULTS=${DEFAULT_DESTINATION_TEST_RESULTS_DIR}/AntReports/TEST-edu.wpi.first.wpilibj.test.TestSuite.xml

View File

@@ -0,0 +1,83 @@
#!/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. *#
#*----------------------------------------------------------------------------*#
# Configurable variables
source config.sh
# Java variables
DEFAULT_DESTINATION_JAVA_TEST_FILE=${DEFAULT_TEST_SCP_DIR}/${DEFAULT_JAVA_TEST_NAME}
# C++ Variables
DEFAULT_DESTINATION_CPP_TEST_FILE=${DEFAULT_TEST_SCP_DIR}/${DEFAULT_CPP_TEST_NAME}
DEFAULT_DESTINATION_RUN_TEST_SCRIPT=${DEFAULT_DESTINATION_DIR}/${DEFAULT_LOCAL_RUN_TEST_SCRIPT}
usage="$(basename "$0") [-h] (java|cpp) [-A] [arg] [arg]...
A script designed to run the integration tests.
This script should only be run on the roborio.
Where:
-h Show this help text.
-A Disable language recomended arguments.
arg Additional arguments to be passed to test."
# These variables are set when the language is selected
LANGUAGE=none
LOCAL_TEST_FILE=none
DESTINATION_TEST_FILE=none
TEST_RUN_ARGS=""
# Begin searching for options from the third paramater on
PARAM_ARGS=${@:2}
if [[ "$1" = java ]]; then
LANGUAGE=$1
LOCAL_TEST_FILE=$DEFAULT_LOCAL_JAVA_TEST_FILE
DESTINATION_TEST_FILE=$DEFAULT_DESTINATION_JAVA_TEST_FILE
elif [[ "$1" = cpp ]]; then
LANGUAGE=$1
LOCAL_TEST_FILE=$DEFAULT_LOCAL_CPP_TEST_FILE
DESTINATION_TEST_FILE=$DEFAULT_DESTINATION_CPP_TEST_FILE
elif [[ "$1" = "-h" ]]; then
printf "Usage:\n"
echo "$usage"
exit
else
printf "Invalid language selection: %s\n\n" "$1" >&2
echo "$usage" >&2
exit 1
fi
# Check if the test file to upload exists
if [[ ! -e ${LOCAL_TEST_FILE} ]]; then
printf "The test file does not exist: %s\nAre you sure that you compiled the tests??\n\n" "${LOCAL_TEST_FILE}" >&2
echo "$usage" >&2
exit 1
fi
TEST_RUN_ARGS="${@:2}"
shopt -s huponexit
SCP_TEST_SCRIPT="scp config.sh ${DEFAULT_LOCAL_RUN_TEST_SCRIPT} ${ROBOT_ADDRESS}:/${DEFAULT_DESTINATION_DIR}"
SSH_CHMOD_AND_MAKE_TEMP_TEST_DIR="ssh -t ${ROBOT_ADDRESS} 'chmod a+x ${DEFAULT_DESTINATION_RUN_TEST_SCRIPT}; mkdir ${DEFAULT_TEST_SCP_DIR} 2>/dev/null'"
SCP_TEST_PROGRAM="scp ${LOCAL_TEST_FILE} ${ROBOT_ADDRESS}:/${DESTINATION_TEST_FILE}"
SSH_RUN_TESTS="ssh -t ${ROBOT_ADDRESS} '${DEFAULT_DESTINATION_RUN_TEST_SCRIPT} ${LANGUAGE} $(whoami) -d ${DEFAULT_TEST_SCP_DIR} ${TEST_RUN_ARGS}'"
if [ $(which sshpass) ]; then
sshpass -p "" ${SCP_TEST_SCRIPT}
sshpass -p "" ${SSH_CHMOD_AND_MAKE_TEMP_TEST_DIR}
sshpass -p "" ${SCP_TEST_PROGRAM}
sshpass -p "" ${SSH_RUN_TESTS}
else
eval ${SCP_TEST_SCRIPT}
eval ${SSH_CHMOD_AND_MAKE_TEMP_TEST_DIR}
eval ${SCP_TEST_PROGRAM}
eval ${SSH_RUN_TESTS}
fi

View File

@@ -0,0 +1,50 @@
#!/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. *#
#*----------------------------------------------------------------------------*#
# Configurable variables
source config.sh
# If there are already test results in the repository then remove them
if [[ -e ${DEFAULT_LOCAL_TEST_RESULTS_DIR} ]]; then
rm -R ${DEFAULT_LOCAL_TEST_RESULTS_DIR}
fi
# Make the directory where the tests should live
mkdir ${DEFAULT_LOCAL_TEST_RESULTS_DIR} 2>/dev/null
# Remove the preivous test results from the the robot
SSH_REMOVE_OLD_TEST_RESULTS="ssh -t ${ROBOT_ADDRESS} 'rm -R ${DEFAULT_DESTINATION_TEST_RESULTS_DIR}; mkdir ${DEFAULT_DESTINATION_TEST_RESULTS_DIR}'"
if [ $(which sshpass) ]; then
sshpass -p "" ${SSH_REMOVE_OLD_TEST_RESULTS}
else
eval ${SSH_REMOVE_OLD_TEST_RESULTS}
fi
printf "Running cpp test\n"
# Run the C++ Tests
deploy-and-run-test-on-robot.sh cpp "--gtest_output=xml:${DEFAULT_DESTINATION_CPP_TEST_RESULTS}"
# Retrive the C++ Test Results
SCP_GET_CPP_TEST_RESULT="scp ${ROBOT_ADDRESS}:${DEFAULT_DESTINATION_CPP_TEST_RESULTS} ${DEFAULT_LOCAL_CPP_TEST_RESULT}"
if [ $(which sshpass) ]; then
sshpass -p "" ${SCP_GET_CPP_TEST_RESULT}
else
eval ${SCP_GET_CPP_TEST_RESULT}
fi
# Run the Java Tests
deploy-and-run-test-on-robot.sh java
# Retrive the Java Test Results
SCP_GET_JAVA_TEST_RESULT="scp ${ROBOT_ADDRESS}:${DEFAULT_DESTINATION_JAVA_TEST_RESULTS} ${DEFAULT_LOCAL_JAVA_TEST_RESULT}"
if [ $(which sshpass) ]; then
sshpass -p "" ${SCP_GET_JAVA_TEST_RESULT}
else
eval ${SCP_GET_JAVA_TEST_RESULT}
fi

View File

@@ -0,0 +1,166 @@
#!/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. *#
#*----------------------------------------------------------------------------*#
# This file is intended to be run in the DEFAULT_TEST_DIR on the roboRIO.
# Do not attempt to run this file on your local system.
# There is one file (delploy-and-run-test-on-robot.sh) that is designed to
# deploy this file allong with the compiled tests for you.
# Configurable variables
source config.sh
DEFAULT_TEST_DIR=${DEFAULT_DESTINATION_DIR}
DEFAULT_PATH_TO_JRE=/usr/local/frc/JRE/bin/java
usage="$(basename "$0") [-h] (java|cpp) name [-d test_dir] [-A] [arg] [arg]...
A script designed to run the integration tests.
This script should only be run on the roborio.
Where:
-h Show this help text
name The name of the user trying to run the tests (used for driver station)
-d The directory where the tests have been placed.
This is done to prevent overwriting an already running program
in the case where another user already has the driver station mutex.
This scrip will automatically move the test into the ${DEFAULT_TEST_DIR}
directory when the driver station mutex is released.
Default: Assumes the test is in the same directory as this scrip.
-A Do not use the default arguments for the given language.
arg The arguments to be passed to test."
mutexTaken=false
# This function should run even if the script exits abnormally
function finish {
if [ "$mutexTaken" == true ]; then
/usr/local/frc/bin/teststand ds --name="${NAME}" disable
/usr/local/frc/bin/teststand give --name="${NAME}"
mutexTaken=false
fi
}
trap finish EXIT SIGINT
# This function should be run asynchronysly to enable the tests 10
# seconds after they have been run.
function enableIn10Seconds {
sleep 10
/usr/local/frc/bin/teststand ds --name="${NAME}" enable
}
# Are you trying to run this program on a platform other than the roboRIO?
if [[ ! -e "${DEFAULT_TEST_DIR}" ]]; then
printf "Failed to find %s\nAre you trying to run this file on your local computer?\n" "${DEFAULT_TEST_DIR}"
printf "This script should only be run on the roboRIO.\n\n"
echo "$usage"
exit 1
fi
LANGUAGE=none
TEST_FILE=none
NAME=$2
TEST_DIR="$DEFAULT_TEST_DIR"
# Begin searching for options from the third paramater on
PARAM_ARGS=${@:3}
# Where the test arguments start
TEST_RUN_ARGS=${@:3}
RUN_WITH_DEFAULT_ARGS=true
DEFAULT_ARGS=""
# Determine the language that we are attempting to run
if [[ "$1" = java ]]; then
LANGUAGE=$1
TEST_FILE=$DEFAULT_JAVA_TEST_NAME
DEFAULT_ARGS=$DEFAULT_JAVA_TEST_ARGS
elif [[ "$1" = cpp ]]; then
LANGUAGE=$1
TEST_FILE=$DEFAULT_CPP_TEST_NAME
DEFAULT_ARGS=$DEFAULT_CPP_TEST_ARGS
elif [[ "$1" = "-h" ]]; then
#If the first argument is the help option
#Allow it to be searhced for in getopts
PARAM_ARGS=${@}
else
printf "Invalid language selection: %s\n\n" "$1" >&2
echo "$usage" >&2
exit 1
fi
PARAM_COUNTER=2
printf "Param Args ${PARAM_ARGS}\n"
# Check for optional paramaters
while getopts ':hd:A' option $PARAM_ARGS ; do
case "$option" in
h)
# Print the help message
printf "Usage:\n"
echo "$usage"
exit
;;
A)
# Remove the default arguments
RUN_WITH_DEFAULT_ARGS=false
PARAM_COUNTER=$[$PARAM_COUNTER +1]
;;
d)
TEST_DIR=$OPTARG
# Since we are selecting the directory the run args start from the 5th argument
PARAM_COUNTER=$[$PARAM_COUNTER +2]
;;
?)
# When an unknown param is found then we are done so break
break
;;
esac
done
TEST_RUN_ARGS=${@:$[$PARAM_COUNTER +1]}
if [[ "$RUN_WITH_DEFAULT_ARGS" == true ]]; then
TEST_RUN_ARGS="${DEFAULT_ARGS} ${TEST_RUN_ARGS}"
fi
# Make sure at least two paramaters are passed or four if running with -d option
if [[ $# -lt $PARAM_COUNTER ]]; then
printf "Invalid arg count. Should be %s, was %s.\n" "${PARAM_COUNTER}" "$#"
echo "$usage"
exit 1
fi
# Attempt to take the mutex for the driver station
mutexTaken=true
/usr/local/frc/bin/teststand take --name="${NAME}"
# Kill all running robot programs
killall java FRCUserProgram
# Once we have the mutex no other tests are running
# If we are running with the -d argument move the test to the DEFAULT_TEST_DIR
if [[ ! -e "${TEST_DIR}/${TEST_FILE}" ]]; then
printf "Failed to find %s.\nDid you copy the test file correctly?\n" "${TEST_DIR}/${TEST_FILE}"
echo "$usage"
exit 1
elif [[ $TEST_DIR != "$DEFAULT_TEST_DIR" ]]; then
mv "${TEST_DIR}/${TEST_FILE}" "${DEFAULT_TEST_DIR}"
fi
# Make sure the excecutable file has permission to run
# Setup the driver station to enable automatically in 10 seconds without waiting for the function to excecute.
enableIn10Seconds&
# Store the run command for the language
RUN_COMMAND=none
if [[ ${LANGUAGE} = java ]]; then
chmod a+x ${DEFAULT_JAVA_TEST_NAME}
RUN_COMMAND="${DEFAULT_PATH_TO_JRE} -ea -jar ${DEFAULT_JAVA_TEST_NAME} ${TEST_RUN_ARGS}"
elif [[ ${LANGUAGE} = cpp ]]; then
chmod a+x ${DEFAULT_CPP_TEST_NAME}
RUN_COMMAND="./${DEFAULT_CPP_TEST_NAME} ${TEST_RUN_ARGS}"
fi
printf "Running: %s\n\n" "${RUN_COMMAND}"
eval ${RUN_COMMAND}

View 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