Files
fprime/ci/tests/RPI.bash
M Starch 3644086829 Fixing RPI CI By Setting Up Downloadable Toolchain (#1855)
* attempring to add sysroot to RPI

* adding set -x to RPI build to debug in Github actions

* Configure RPI to be a cross-compiler

* moving SYSROOT out of GITHUB_WORKSAPCE

* limiting sysroot to RPI builds

* resetting settings

* Using RPI action to procure toolchain

* lestarch: moving clean-up to post run script

* repairing RPI integration tests to latest version

* formating integration tests

* passing in dictionary for RPI

* fixing minor int test problems

* fixing FilterSeverity
2023-01-23 16:51:37 -08:00

53 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
set -x
####
# RPI.bash:
#
# Run the tests on the software through fp-util.
####
export CTEST_OUTPUT_ON_FAILURE=1
export SCRIPT_DIR="$(dirname ${BASH_SOURCE})"
. "${SCRIPT_DIR}/../helpers.bash"
. ${SCRIPT_DIR}/fputil.bash
#### NEEDED ENVIRONMENT ####
export FPRIME_DIR="$(cd ${SCRIPT_DIR}/../..; pwd)"
export LOG_DIR="${FPRIME_DIR}/ci-RPI-logs-$(date +"%Y-%m-%dT%H%M%S")"
mkdir -p "${LOG_DIR}"
# Directory to be used for Ref CI test
export FPUTIL_DEPLOYS="${FPRIME_DIR}/RPI"
echo -e "${BLUE}Starting CI test ${FPUTIL_DEPLOYS} RPI${NOCOLOR}"
export CMAKE_EXTRA_SETTINGS=""
if [ ! -d "/usr/arm-linux-gnueabihf" ]
then
warn_and_cont "RPI tools not installed, refusing to test."
continue
fi
echo -e "${BLUE}Testing ${FPUTIL_DEPLOYS} against fprime-util targets: ${FPUTIL_TARGETS[@]}${NOCOLOR}"
export CHECK_TARGET_PLATFORM="native"
for target in "${FPUTIL_TARGETS[@]}"
do
# For RPI deployment to disable FRAMEWORK UTS
export CMAKE_EXTRA_SETTINGS="-DFPRIME_ENABLE_FRAMEWORK_UTS=OFF"
if [[ "${target}" == "generate" ]]
then
rm -rf "${FPUTIL_DEPLOYS}/build-fprime-automatic-"*
fi
# When a sysroot is supplied on the base generate target (cross-compiler) add the SYSROOT to the run
if [[ "${target}" == "generate" ]] && [[ "$1" != "" ]]
then
export CMAKE_EXTRA_SETTINGS="${CMAKE_EXTRA_SETTINGS} -DCMAKE_SYSROOT=${1}"
fi
fputil_action "${FPUTIL_DEPLOYS}" "${target}"
done
# Test Completed
echo -e "${GREEN}CI test ${FPUTIL_DEPLOYS} RPI SUCCESSFUL${NOCOLOR}"
archive_logs