Update Jenkinsfile (#239)

This commit is contained in:
quillford 2019-07-03 19:47:41 -07:00 committed by GitHub
parent 1bd9284372
commit 3c3ff0c03b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 15 deletions

40
Jenkinsfile vendored
View File

@ -20,22 +20,42 @@ pipeline {
}
}
}
stage('Test EON Build') {
stage('Test Dev Build (no WIFI)') {
steps {
lock(resource: "Pandas", inversePrecedence: true, quantity:1){
lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
timeout(time: 60, unit: 'MINUTES') {
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev.xml"
sh "touch EON && docker cp EON ${env.DOCKER_NAME}:/EON"
sh "docker start -a ${env.DOCKER_NAME}"
script {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; SKIPWIFI=1 ./run_automated_tests.sh'"
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev_nowifi.xml"
sh "docker rm ${env.DOCKER_NAME}"
}
}
}
}
}
stage('Test Dev Build') {
stage('Test EON Build') {
steps {
lock(resource: "Pandas", inversePrecedence: true, quantity:1){
lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
timeout(time: 60, unit: 'MINUTES') {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; ./run_automated_tests.sh '"
script {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'touch /EON; cd /tmp/panda; ./run_automated_tests.sh'"
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_eon.xml"
sh "docker rm ${env.DOCKER_NAME}"
}
}
}
}
}
stage('Test Dev Build (WIFI)') {
steps {
lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
timeout(time: 60, unit: 'MINUTES') {
script {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; ./run_automated_tests.sh'"
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev.xml"
sh "docker rm ${env.DOCKER_NAME}"
currentStage.result = "SUCCESS"
}
}
}
}
@ -43,10 +63,6 @@ pipeline {
}
post {
always {
script {
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_EON.xml"
sh "docker rm ${env.DOCKER_NAME}"
}
junit "test_results*.xml"
}
}

View File

@ -1,15 +1,19 @@
#!/bin/bash
#!/bin/bash -e
TEST_FILENAME=${TEST_FILENAME:-nosetests.xml}
if [ -f "/EON" ]; then
TESTSUITE_NAME="Panda_Test-EON"
TEST_SCRIPTS=$(ls tests/automated/$1*.py | grep -v "wifi")
else
TESTSUITE_NAME="Panda_Test-DEV"
fi
if [ ! -z "${SKIPWIFI}" ] || [ -f "/EON" ]; then
TEST_SCRIPTS=$(ls tests/automated/$1*.py | grep -v wifi)
else
TEST_SCRIPTS=$(ls tests/automated/$1*.py)
fi
cd boardesp
make flashall
env PYTHONPATH="${PWD%/*/*}" make flashall
cd ..
IFS=$'\n'