CI: ensure we don't break autotest help options
This commit is contained in:
parent
db4f974c64
commit
aed69928ee
29
.github/workflows/test_scripts.yml
vendored
Normal file
29
.github/workflows/test_scripts.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: test scripts
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
concurrency:
|
||||
group: ci-${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
container: ardupilot/ardupilot-dev-base:latest
|
||||
strategy:
|
||||
fail-fast: false # don't cancel if a job from the matrix fails
|
||||
matrix:
|
||||
config: [
|
||||
check_autotest_options
|
||||
]
|
||||
steps:
|
||||
# git checkout the PR
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: test ${{matrix.config}}
|
||||
env:
|
||||
CI_BUILD_TARGET: ${{matrix.config}}
|
||||
shell: bash
|
||||
run: |
|
||||
Tools/scripts/build_ci.sh
|
@ -45,14 +45,7 @@ function install_pymavlink() {
|
||||
fi
|
||||
}
|
||||
|
||||
function run_autotest() {
|
||||
NAME="$1"
|
||||
BVEHICLE="$2"
|
||||
RVEHICLE="$3"
|
||||
|
||||
# report on what cpu's we have for later log review if needed
|
||||
cat /proc/cpuinfo
|
||||
|
||||
function install_mavproxy() {
|
||||
if [ $mavproxy_installed -eq 0 ]; then
|
||||
echo "Installing MAVProxy"
|
||||
pushd /tmp
|
||||
@ -65,6 +58,17 @@ function run_autotest() {
|
||||
# now uninstall the version of pymavlink pulled in by MAVProxy deps:
|
||||
python -m pip uninstall -y pymavlink
|
||||
fi
|
||||
}
|
||||
|
||||
function run_autotest() {
|
||||
NAME="$1"
|
||||
BVEHICLE="$2"
|
||||
RVEHICLE="$3"
|
||||
|
||||
# report on what cpu's we have for later log review if needed
|
||||
cat /proc/cpuinfo
|
||||
|
||||
install_mavproxy
|
||||
install_pymavlink
|
||||
unset BUILDROOT
|
||||
echo "Running SITL $NAME test"
|
||||
@ -345,6 +349,16 @@ for t in $CI_BUILD_TARGET; do
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$t" == "check_autotest_options" ]; then
|
||||
echo "Checking autotest options"
|
||||
install_mavproxy
|
||||
install_pymavlink
|
||||
./Tools/autotest/autotest.py --help
|
||||
./Tools/autotest/autotest.py --list
|
||||
./Tools/autotest/autotest.py --list-subtests
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$t" == "signing" ]; then
|
||||
echo "Building signed firmwares"
|
||||
sudo apt-get update
|
||||
|
Loading…
Reference in New Issue
Block a user