scripts should fail harder when they fail

This commit is contained in:
Matthew Kennedy 2024-03-07 22:17:37 -08:00
parent a44b110a37
commit da1ad5b34f
10 changed files with 12 additions and 11 deletions

View File

@ -7,7 +7,8 @@ HW_TARGET=$2
# .github/workflows/hw-ci/build_for_hw_ci.sh config/boards/f407-discovery f407-discovery
# .github/workflows/hw-ci/build_for_hw_ci.sh config/boards/proteus proteus_f4
set -e
set -euo pipefail
echo "HW CI build [$HW_FOLDER][$HW_TARGET]"
cd firmware

View File

@ -5,7 +5,7 @@
HW_SUITE=$1
set -e
set -euo pipefail
cd java_tools
./gradlew :autotest:shadowJar

View File

@ -4,7 +4,7 @@ PROJECT_BOARD=$1
PROJECT_CPU=$2
# fail on error
set -e
set -euo pipefail
SCRIPT_NAME="common_make.sh"
echo "Entering $SCRIPT_NAME with board $1 and CPU $2"

View File

@ -5,7 +5,7 @@
# or ./gen_config_board.sh hellen/hellen128 hellen128
# which is short for ./gen_config_board.sh hellen/hellen128 hellen128 rusefi_hellen128.ini
set -e
set -euo pipefail
echo "This script reads rusefi_config.txt and produces firmware persistent configuration headers"
echo "the storage section of rusefiXXX.ini is updated as well"

View File

@ -4,7 +4,7 @@
# hw_layer/mass_storage/create_ini_image.sh tunerstudio/generated/rusefi.ini hw_layer/mass_storage/ramdisk_image.h 112 test https://rusefi.com/s/test
# fail on error
set -e
set -euo pipefail
if [ "$(expr substr $(uname -s) 1 6)" == "CYGWIN" ] || [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
echo No image on $(uname -s)

View File

@ -4,7 +4,7 @@
# hw_layer/mass_storage/create_ini_image_compressed.sh tunerstudio/generated/rusefi.ini hw_layer/mass_storage/ramdisk_image.h 1024 test https://rusefi.com/s/test
# fail on error
set -e
set -euo pipefail
if [ "$(expr substr $(uname -s) 1 6)" == "CYGWIN" ] || [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
echo No image on $(uname -s)

View File

@ -4,6 +4,8 @@
# file build_working_folder.sh
#
set -euo pipefail
FULL_BUNDLE_FILE="${BUNDLE_FULL_NAME}.zip"
echo "${BUNDLE_FULL_NAME}: Packaging temp/$FULL_BUNDLE_FILE file"
@ -62,8 +64,6 @@ RUSEFI_CONSOLE_SETTINGS=""
cp -r misc/install/STM32_Programmer_CLI $CONSOLE_FOLDER
cp firmware/deliver/fome.bin $FOLDER
# just for now - DFU work in progress
cp firmware/deliver/fome.hex $FOLDER
# bootloader
[ -e firmware/deliver/fome_bl.bin ] && { cp firmware/deliver/fome_bl.bin $FOLDER ; }

View File

@ -1,7 +1,7 @@
#!/bin/bash
# fail on error!
set -e
set -euo pipefail
# for example 'config/boards/proteus'
BOARD_DIR="$1"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -e
set -euo pipefail
rm -f build/fome_simulator.exe
make -j8 -r $@

View File

@ -3,7 +3,7 @@
# This script runs every test in its own process (own invocation of fome_test executable)
# This allows us to test for accidental cross-test leakage that fixes/breaks something
set -e
set -euo pipefail
export GTEST_TOTAL_SHARDS=600
for IDX in {0..599}