rusefi-1/unit_tests/ci_gcov.sh

42 lines
931 B
Bash
Raw Normal View History

#!/bin/bash
2020-06-16 15:25:41 -07:00
#
# this one used by github actions
# this scripts replaces run_gcov.sh
#
if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then
echo "No Secrets"
exit 0
fi
rm -rf gcov_working_area
mkdir gcov_working_area
cd gcov_working_area
echo "Looking for source code"
find .. -name *.c* > source_files.txt
find ../../firmware/console/ -name *.c* >> source_files.txt
find ../../firmware/controllers/ -name *.c* >> source_files.txt
wc -l source_files.txt
xargs -L 1 -I {} cp {} . < source_files.txt
cp ../build/obj/* .
echo -e "\nGenerating coverage"
gcov *.c* > gcov.log 2>gcov.err
echo -e "\nCollecting coverage"
lcov --capture --directory . --output-file coverage.info
echo -e "\nGenerating HTML"
genhtml coverage.info --output-directory gcov
Use github actions to build and upload bundles (#1583) * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space
2020-07-08 08:10:24 -07:00
if [ -n "$RUSEFI_FTP_SERVER" ]; then
echo -e "\nUploading HTML"
ncftpput -m -R -v -u "$1" -p "$2" "$3" /unit_tests_coverage gcov/*
fi