Convert integration_and_primary_bundle scripts to sh (#1562)
* convert gen_upload_docs.bat * convert run.bat * forgot to add run.sh * convert gen_upload_docs.bat * remove checking from bats * fix path * fix path again * fix file extension * remove escapes * added missing quotation and escapes * add escapes * change config for testing * convert build_current_bundle * convert clean_bootloader * convert compile_bootloader_discovery * convert compile_bootloader * fix path * convert run.sh * fix path again * convert hw_test * convert flash_erase407 * convert flash_openocd407 * fix missing or * fix another missing or * fix quote * add quotes * add more quotes * remove spurious call * add more quotes * convert simulator_test * Add simulator_test * Added semicolon * add exports * change destination path * add quotes and error check * moved rm and changed path back * change path * let the dead be * add env var to skip hw test * redo logic Co-authored-by: David Holdeman <David Holdeman>
This commit is contained in:
parent
0f62bcf804
commit
a2573f5acd
|
@ -15,3 +15,6 @@
|
|||
[submodule "hardware/InteractiveHtmlBom"]
|
||||
path = hardware/InteractiveHtmlBom
|
||||
url = https://github.com/openscopeproject/InteractiveHtmlBom.git
|
||||
[submodule "misc/InteractiveHtmlBom"]
|
||||
path = misc/InteractiveHtmlBom
|
||||
url = https://github.com/openscopeproject/InteractiveHtmlBom
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
make -f src/Makefile clean
|
||||
@echo off
|
||||
sh.exe clean_bootloader.sh
|
||||
|
|
|
@ -1,29 +1,2 @@
|
|||
@echo off
|
||||
|
||||
set script_name=!compile_bootloader.bat
|
||||
echo Entering %script_name%
|
||||
|
||||
rem Needed for board overrides
|
||||
IF "%BOOTLOADER_CODE_DESTINATION_PATH%"=="" (SET BOOTLOADER_CODE_DESTINATION_PATH="..")
|
||||
|
||||
set BOOTLOADER_CODE_DESTINATION_FILE=%BOOTLOADER_CODE_DESTINATION_PATH%/bootloader_generated.hxx
|
||||
rm -f %BOOTLOADER_CODE_DESTINATION_FILE%
|
||||
|
||||
echo %script_name%: Starting bootloader compilation...
|
||||
make -j4 -f src/Makefile %1 %2 %3
|
||||
|
||||
if errorlevel 1 echo make compilation failed
|
||||
if errorlevel 1 exit -1
|
||||
|
||||
echo %script_name%: Bootloader build success.
|
||||
|
||||
cd blbuild
|
||||
rem Generate a header file with binary bootloader code
|
||||
java -jar ../../../java_tools/bin2header.jar bootloader.bin %BOOTLOADER_CODE_DESTINATION_FILE% "%BOOTLOADER_COMMENT% static const volatile uint8_t bootloader_code[] BOOTLOADER_SECTION"
|
||||
cd ..
|
||||
|
||||
rem Touch 'bootloader_storage.c' to update its modification date (needed for make)
|
||||
copy /b bootloader_storage.c +,,
|
||||
|
||||
pwd
|
||||
call ../config/boards/clean_env_variables.bat
|
||||
sh.exe compile_bootloader.sh
|
||||
|
|
|
@ -1,17 +1,2 @@
|
|||
@echo off
|
||||
|
||||
echo Starting compilation for Discovery-407
|
||||
|
||||
rem set PROJECT_BOARD=Prometheus
|
||||
rem set PROMETHEUS_BOARD=405
|
||||
rem set EXTRA_PARAMS=-DDUMMY -DSTM32F405xx -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE
|
||||
set EXTRA_PARAMS=-DDUMMY -DEFI_BOOTLOADER ^
|
||||
-DCH_DBG_ENABLE_STACK_CHECK=FALSE ^
|
||||
-DBOARD_TLE8888_COUNT=0 ^
|
||||
-DBOARD_TLE6240_COUNT=0 ^
|
||||
-DBOARD_MC33972_COUNT=0
|
||||
set BOOTLOADER_CODE_DESTINATION_PATH=".."
|
||||
set BOOTLOADER_COMMENT="/*F4discovery*/"
|
||||
rem set DEBUG_LEVEL_OPT="-O2"
|
||||
|
||||
call !compile_bootloader.bat -r
|
||||
sh.exe compile_bootloader_discovery497.sh
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
make -f src/Makefile clean
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
SCRIPT_NAME="compile_bootloader.sh"
|
||||
echo "Entering $SCRIPT_NAME"
|
||||
|
||||
# Needed for board overrides
|
||||
[ $BOOTLOADER_CODE_DESTINATION_PATH ] || { BOOTLOADER_CODE_DESTINATION_PATH=".."; }
|
||||
|
||||
BOOTLOADER_CODE_DESTINATION_FILE=$BOOTLOADER_CODE_DESTINATION_PATH/bootloader_generated.hxx
|
||||
|
||||
echo "$SCRIPT_NAME: Starting bootloader compilation..."
|
||||
make -j4 -f src/Makefile $1 $2 $3
|
||||
|
||||
[ $? -eq 0 ] || { echo "make compilation failed"; exit 1; }
|
||||
|
||||
echo "$SCRIPT_NAME: Bootloader build success."
|
||||
|
||||
cd blbuild
|
||||
# Generate a header file with binary bootloader code
|
||||
rm -f $BOOTLOADER_CODE_DESTINATION_FILE
|
||||
java -jar ../../../java_tools/bin2header.jar bootloader.bin "$BOOTLOADER_CODE_DESTINATION_FILE" "$BOOTLOADER_COMMENT static const volatile uint8_t bootloader_code[] BOOTLOADER_SECTION"
|
||||
[ $? -eq 0 ] || { echo "$SCRIPT_NAME: error generating header file"; exit 1; }
|
||||
cd ..
|
||||
|
||||
# Touch 'bootloader_storage.c' to update its modification date (needed for make)
|
||||
touch bootloader_storage.c
|
||||
|
||||
pwd
|
||||
sh ../config/boards/clean_env_variables.sh
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Starting compilation for Discovery-407"
|
||||
|
||||
# set PROJECT_BOARD=Prometheus
|
||||
# set PROMETHEUS_BOARD=405
|
||||
# set EXTRA_PARAMS=-DDUMMY -DSTM32F405xx -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE
|
||||
export EXTRA_PARAMS="-DDUMMY -DEFI_BOOTLOADER \
|
||||
-DCH_DBG_ENABLE_STACK_CHECK=FALSE \
|
||||
-DBOARD_TLE8888_COUNT=0 \
|
||||
-DBOARD_TLE6240_COUNT=0 \
|
||||
-DBOARD_MC33972_COUNT=0"
|
||||
export BOOTLOADER_CODE_DESTINATION_PATH=".."
|
||||
export BOOTLOADER_COMMENT="/*F4discovery*/"
|
||||
# set DEBUG_LEVEL_OPT="-O2"
|
||||
|
||||
sh compile_bootloader.sh
|
|
@ -1,30 +1,2 @@
|
|||
rem st-link_cli -c SWD ur -ME
|
||||
rem 0x100000 would erase both code and configuration
|
||||
rem use 0x080000 if you want to erase only configuratio
|
||||
set script_name=flash_erase407.bat
|
||||
echo Entering %script_name%
|
||||
|
||||
|
||||
rem weird, it used to be much nicer with openocd 0.8.0, file location was not broken?
|
||||
rem maybe https://sourceforge.net/p/openocd/tickets/105/ ?
|
||||
|
||||
pwd
|
||||
cd ../misc/install
|
||||
|
||||
if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND
|
||||
if not exist openocd/openocd.exe exit -1
|
||||
|
||||
|
||||
rem newer discovery boards
|
||||
echo Invoking openocd...
|
||||
openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
|
||||
IF NOT ERRORLEVEL 0 echo ERROR in %script_name%
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
echo Just invoked openocd to erase chip!
|
||||
|
||||
|
||||
rem older disocovery boards or cheap eBay ST-Link
|
||||
rem openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
|
||||
|
||||
echo "exiting %script_name%"
|
||||
@echo off
|
||||
sh.exe flash_erase407.sh
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
# st-link_cli -c SWD ur -ME
|
||||
# 0x100000 would erase both code and configuration
|
||||
# use 0x080000 if you want to erase only configuratio
|
||||
SCRIPT_NAME="flash_erase407.sh"
|
||||
echo "Entering $SCRIPT_NAME"
|
||||
|
||||
|
||||
# weird, it used to be much nicer with openocd 0.8.0, file location was not broken?
|
||||
# maybe https://sourceforge.net/p/openocd/tickets/105/ ?
|
||||
|
||||
pwd
|
||||
cd ../misc/install
|
||||
|
||||
[ -e openocd/openocd.exe ] || { "echo openocd/openocd.exe NOT FOUND"; exit 1; }
|
||||
|
||||
# newer discovery boards
|
||||
echo "Invoking openocd..."
|
||||
./openocd/openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
|
||||
[ $? -eq 0 ] || { echo "ERROR in $SCRIPT_NAME"; exit 1; }
|
||||
|
||||
echo "Just invoked openocd to erase chip!"
|
||||
|
||||
# older discovery boards or cheap eBay ST-Link
|
||||
# openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
|
||||
|
||||
echo "exiting $SCRIPT_NAME"
|
|
@ -1,9 +1,2 @@
|
|||
echo I am flash_openocd.bat
|
||||
|
||||
cd ../misc/install
|
||||
|
||||
if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND
|
||||
if not exist openocd/openocd.exe exit -1
|
||||
|
||||
openocd\openocd -f openocd/stm32f4discovery.cfg -c "program ../../firmware/build/rusefi.bin verify reset exit 0x08000000"
|
||||
|
||||
@echo off
|
||||
sh.exe flash_openocd407.sh
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "I am flash_openocd.sh"
|
||||
|
||||
cd ../misc/install
|
||||
|
||||
[ -e openocd/openocd.exe ] || { echo "openocd/openocd.exe NOT FOUND"; exit 1; }
|
||||
|
||||
./openocd/openocd.exe -f openocd/stm32f4discovery.cfg -c "program ../../firmware/build/rusefi.bin verify reset exit 0x08000000"
|
||||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 14945d7553940520e11c42f4db9cb2273f57ff3f
|
|
@ -1,19 +1,2 @@
|
|||
@echo off
|
||||
|
||||
set kicad_path=c:\progra~1\KiCad
|
||||
set ibom_cmd=%kicad_path%\bin\python.exe C:\stuff\InteractiveHtmlBom\InteractiveHtmlBom\generate_interactive_bom.py --no-browser --name-format %%f_latest --dest-dir ../ibom
|
||||
echo "ibom_cmd=%ibom_cmd%"
|
||||
|
||||
pwd
|
||||
if not exist hardware/frankenso/frankenso.kicad_pcb echo hardware/frankenso/frankenso.kicad_pcb not found. Was this invoked from wrong folder?
|
||||
if not exist hardware/frankenso/frankenso.kicad_pcb exit -1
|
||||
|
||||
%ibom_cmd% hardware/Common_Rail_MC33816/Common_Rail_MC33816.kicad_pcb
|
||||
%ibom_cmd% hardware/brain_board/brain_board_STM32F407.kicad_pcb
|
||||
%ibom_cmd% hardware/brain_board_176-pin/176-pin_board.kicad_pcb
|
||||
%ibom_cmd% --extra-fields "mfg\,mfg#,vend1\,vend1#" hardware/CJ125_board/O2_input_CJ125.kicad_pcb --netlist-file hardware/CJ125_board/O2_input_CJ125.net
|
||||
%ibom_cmd% --extra-fields "MFG\,MFG#,VEND1\,VEND1#" hardware/frankenso/frankenso.kicad_pcb --netlist-file hardware/frankenso/frankenso.net
|
||||
%ibom_cmd% --extra-fields "mfg\,mfg#,vend1\,vend1#" hardware/frankenstein/frankenstein.kicad_pcb --netlist-file hardware/frankenstein/frankenstein.net
|
||||
%ibom_cmd% hardware/mini48-stm32/mini48-stm32.kicad_pcb
|
||||
%ibom_cmd% hardware/HighSideSwitch/VN750PS_E.kicad_pcb
|
||||
%ibom_cmd% hardware/can_board/can_brd_1.kicad_pcb
|
||||
sh.exe misc\jenkins\InteractiveHtmlBom\run.sh
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
IBOM_CMD="python misc/InteractiveHtmlBom/generate_interactive_bom.py --no-browser --name-format \"%f_latest\" --dest-dir ../ibom"
|
||||
echo "IBOM_CMD=$IBOM_CMD"
|
||||
|
||||
pwd
|
||||
[ -e hardware/frankenso/frankenso.kicad_pcb ] || { echo "hardware/frankenso/frankenso.kicad_pcb not found. Was this invoked from wrong folder?"; exit -1; }
|
||||
|
||||
$IBOM_CMD hardware/Common_Rail_MC33816/Common_Rail_MC33816.kicad_pcb
|
||||
$IBOM_CMD hardware/brain_board/brain_board_STM32F407.kicad_pcb
|
||||
$IBOM_CMD hardware/brain_board_176-pin/176-pin_board.kicad_pcb
|
||||
$IBOM_CMD --extra-fields "mfg,mfg#,vend1,vend1#" hardware/CJ125_board/O2_input_CJ125.kicad_pcb --netlist-file hardware/CJ125_board/O2_input_CJ125.net
|
||||
$IBOM_CMD --extra-fields "MFG,MFG#,VEND1,VEND1#" hardware/frankenso/frankenso.kicad_pcb --netlist-file hardware/frankenso/frankenso.net
|
||||
$IBOM_CMD --extra-fields "mfg,mfg#,vend1,vend1#" hardware/frankenstein/frankenstein.kicad_pcb --netlist-file hardware/frankenstein/frankenstein.net
|
||||
$IBOM_CMD hardware/mini48-stm32/mini48-stm32.kicad_pcb
|
||||
$IBOM_CMD hardware/HighSideSwitch/VN750PS_E.kicad_pcb
|
||||
$IBOM_CMD hardware/can_board/can_brd_1.kicad_pcb
|
|
@ -1,103 +1,2 @@
|
|||
rem
|
||||
rem This script would compile firmware, dev console and win32 simulator into a single bundle file
|
||||
rem This script depends on Cygwin tools: zip
|
||||
rem
|
||||
|
||||
set script_name=build_current_bundle
|
||||
set "root_folder=%cd%"
|
||||
echo %script_name Entering root_folder=%root_folder%
|
||||
FOR %%i IN ("%root_folder%") DO (set root_folder=%%~si)
|
||||
echo %script_name Short name %root_folder%"
|
||||
|
||||
echo build_current_bundle.bat: Hello rusEfi build full bundle
|
||||
echo %date% %time%
|
||||
|
||||
cd firmware/bootloader
|
||||
call !clean_bootloader.bat
|
||||
call !compile_bootloader_discovery407.bat
|
||||
if not exist bootloader_generated.hxx echo FAILED TO COMPILE BOOTLOADER
|
||||
if not exist bootloader_generated.hxx exit -1
|
||||
pwd
|
||||
cd ../..
|
||||
rem At root folder here
|
||||
|
||||
cd firmware
|
||||
echo %date% %time%
|
||||
|
||||
|
||||
echo build_current_bundle.bat: will be Erasing chip
|
||||
if not exist flash_erase407.bat echo NOT FOUND flash_erase.bat
|
||||
if not exist flash_erase407.bat exit -1
|
||||
echo build_current_bundle.bat: Erasing chip
|
||||
pwd
|
||||
rem Using magic 'cd' system variable to save current location here
|
||||
set "cur_folder=%cd%"
|
||||
call flash_erase407.bat
|
||||
cd %cur_folder%
|
||||
pwd
|
||||
|
||||
|
||||
echo build_current_bundle.bat: Building firmware
|
||||
call clean.bat
|
||||
git submodule update --init
|
||||
|
||||
call update_version.bat
|
||||
|
||||
call clean_compile_two_versions.bat
|
||||
if not exist deliver/rusefi_no_asserts.hex echo Just to confirm - FAILED to compile no_asserts
|
||||
if not exist deliver/rusefi_no_asserts.hex exit -1
|
||||
|
||||
if not exist deliver/rusefi.hex echo Just to confirm - FAILED to compile default DEBUG
|
||||
if not exist deliver/rusefi.hex exit -1
|
||||
|
||||
|
||||
echo "%script_name%: Building DFU"
|
||||
..\misc\encedo_hex2dfu\hex2dfu.exe -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
|
||||
..\misc\encedo_hex2dfu\hex2dfu.exe -i deliver/rusefi.hex -o deliver/rusefi.dfu
|
||||
ls -l deliver
|
||||
cd ..
|
||||
|
||||
rem At root folder here
|
||||
|
||||
call misc\jenkins\build_java_console.bat
|
||||
if not exist java_console_binary/rusefi_console.jar exit -1
|
||||
|
||||
call misc\jenkins\build_simulator.bat
|
||||
if not exist simulator/build/rusefi_simulator.exe exit -1
|
||||
|
||||
set stm_arch=stm32f407
|
||||
rem This depends on Cygwin date copied under 'datecyg' name to avoid conflict with Windows date
|
||||
rem By the way, '%%' is the way to escape % in batch files
|
||||
rem this is copy-pasted at build_version.bat
|
||||
for /f %%i in ('datecyg +%%Y%%m%%d_%%H%%M%%S') do set TIMESTAMP=%%i
|
||||
|
||||
set folder=snapshot_%TIMESTAMP%_%stm_arch%_rusefi
|
||||
echo "%script_name%: folder variable1=%folder%"
|
||||
set folder=temp\%folder%
|
||||
echo "%script_name%: folder variable3=%folder%"
|
||||
|
||||
pwd
|
||||
set bundle_full_name=rusefi_bundle
|
||||
call misc\jenkins\build_working_folder.bat
|
||||
IF NOT ERRORLEVEL 0 (
|
||||
echo %script_name%: ERROR: invoking build_working_folder.bat
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
echo "%script_name%: Building only console"
|
||||
pwd
|
||||
dir
|
||||
zip %root_folder%/temp/rusefi_console.zip %root_folder%/java_console_binary/rusefi_console.jar %root_folder%/java_console/rusefi.xml
|
||||
|
||||
if not exist %root_folder%/temp/rusefi_console.zip echo CONSOLE ZIP FAILED
|
||||
if not exist %root_folder%/temp/rusefi_console.zip exit -1
|
||||
|
||||
echo "%script_name%: only console ready"
|
||||
|
||||
echo "%script_name%: Going back to root folder"
|
||||
cd %root_folder%
|
||||
pwd
|
||||
|
||||
echo "TIMESTAMP %date% %time%"
|
||||
pwd
|
||||
echo "exiting %script_name%"
|
||||
@echo off
|
||||
sh.exe misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script would compile firmware, dev console and win32 simulator into a single bundle file
|
||||
# This script depends on Cygwin tools: zip
|
||||
|
||||
SCRIPT_NAME="build_current_bundle"
|
||||
ROOT_FOLDER=$(pwd)
|
||||
echo "$SCRIPT_NAME Entering ROOT_FOLDER=$ROOT_FOLDER"
|
||||
|
||||
echo "$SCRIPT_NAME.sh: Hello rusEfi build full bundle"
|
||||
date "+%a %D %T.%2S"
|
||||
|
||||
cd firmware/bootloader
|
||||
sh clean_bootloader.sh
|
||||
sh compile_bootloader_discovery407.sh
|
||||
[ -e bootloader_generated.hxx ] || { echo "FAILED TO COMPILE BOOTLOADER"; exit 1; }
|
||||
pwd
|
||||
cd ../..
|
||||
# At root folder here
|
||||
|
||||
cd firmware
|
||||
date "+%a %D %T.%2S"
|
||||
|
||||
echo "$SCRIPT_NAME: will be Erasing chip"
|
||||
[ -e flash_erase407.sh ] || { echo "NOT FOUND flash_erase.sh"; exit 1; ]
|
||||
echo "$SCRIPT_NAME: Erasing chip"
|
||||
sh flash_erase407.sh
|
||||
|
||||
echo "$SCRIPT_NAME: Building firmware"
|
||||
sh clean.sh
|
||||
|
||||
sh update_version.sh
|
||||
|
||||
sh clean_compile_two_versions.sh
|
||||
[ -e deliver/rusefi_no_asserts.hex ] || { echo "Just to confirm - FAILED to compile no_asserts"; exit 1; }
|
||||
|
||||
[ -e deliver/rusefi.hex ] { echo "Just to confirm - FAILED to compile default DEBUG"; exit 1; }
|
||||
|
||||
echo "$SCRIPT_NAME: Building DFU"
|
||||
if uname | grep "NT"; then
|
||||
chmod u+x ../misc/encedo_hex2dfu/hex2dfu.exe
|
||||
../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
|
||||
../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi.hex -o deliver/rusefi.dfu
|
||||
else
|
||||
chmod u+x ../misc/encedo_hex2dfu/hex2dfu.bin
|
||||
../misc/encedo_hex2dfu/hex2dfu.bin -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
|
||||
../misc/encedo_hex2dfu/hex2dfu.bin -i deliver/rusefi.hex -o deliver/rusefi.dfu
|
||||
fi
|
||||
|
||||
ls -l deliver
|
||||
cd ..
|
||||
|
||||
# At root folder here
|
||||
|
||||
sh misc/jenkins/build_java_console.sh
|
||||
[ -e java_console_binary/rusefi_console.jar ] || { echo "rusefi_console.jar build FAILED"; exit -1; }
|
||||
|
||||
sh misc/jenkins/build_simulator.sh
|
||||
[ -e simulator/build/rusefi_simulator.exe ] || { echo "rusefi_simulator.exe build FAILED"; exit -1; }
|
||||
|
||||
STM_ARCH="stm32f407"
|
||||
TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
|
||||
|
||||
FOLDER="snapshot_${TIMESTAMP}_${STM_ARCH}_rusefi"
|
||||
echo "$SCRIPT_NAME: folder variable1=$FOLDER"
|
||||
export FOLDER="temp/$FOLDER"
|
||||
echo "$SCRIPT_NAME: folder variable3=$FOLDER"
|
||||
|
||||
pwd
|
||||
export BUNDLE_FULL_NAME="rusefi_bundle"
|
||||
sh misc/jenkins/build_working_folder.sh
|
||||
[ $? -eq 0 ] || { echo "$SCRIPT_NAME: ERROR: invoking build_working_folder.sh"; exit 1; }
|
||||
|
||||
echo "$SCRIPT_NAME: Building only console"
|
||||
pwd
|
||||
ls
|
||||
zip "$ROOT_FOLDER/temp/rusefi_console.zip" "$ROOT_FOLDER/java_console_binary/rusefi_console.jar" "$ROOT_FOLDER/java_console/rusefi.xml"
|
||||
|
||||
[ -e "$ROOT_FOLDER/temp/rusefi_console.zip" ] || { echo "CONSOLE ZIP FAILED"; exit 1; }
|
||||
|
||||
echo "$SCRIPT_NAME: only console ready"
|
||||
|
||||
echo "$SCRIPT_NAME: Going back to root folder"
|
||||
cd "$ROOT_FOLDER"
|
||||
pwd
|
||||
|
||||
echo "TIMESTAMP $(date "+%a %D %T.%2S")"
|
||||
pwd
|
||||
echo "exiting $SCRIPT_NAME"
|
|
@ -1,44 +1,2 @@
|
|||
echo "TIMESTAMP %date% %time%"
|
||||
set script_name=hw_test.bat
|
||||
echo Entering %script_name%
|
||||
pwd
|
||||
|
||||
cd firmware
|
||||
rem Using magic 'cd' system variable here
|
||||
set "cur_folder=%cd%"
|
||||
echo "%script_name%: erasing first"
|
||||
call flash_erase407.bat
|
||||
cd %cur_folder%
|
||||
pwd
|
||||
echo "%script_name%: trying to flash"
|
||||
rem This script depends on someone else building firmware
|
||||
call flash_openocd407.bat
|
||||
IF NOT ERRORLEVEL 0 echo ERROR invoking flash_openocd407.bat
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
cd %cur_folder%
|
||||
|
||||
if not exist build/rusefi.bin echo FIRMWARE NOT FOUND
|
||||
if not exist build/rusefi.bin exit -1
|
||||
|
||||
pwd
|
||||
|
||||
cd ..
|
||||
|
||||
rem echo Running some commands
|
||||
rem pwd
|
||||
rem java -cp java_console_binary\rusefi_console.jar com.rusefi.CmdLine "set_led_blinking_period 10"
|
||||
|
||||
cd java_console
|
||||
|
||||
echo Running tests
|
||||
which java
|
||||
which javac
|
||||
ant realtest
|
||||
|
||||
IF NOT ERRORLEVEL 0 echo ERROR DETECTED
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
echo "TIMESTAMP %date% %time%"
|
||||
pwd
|
||||
echo "exiting %script_name%"
|
||||
@echo off
|
||||
sh.exe misc/jenkins/functional_test_and_build_bundle.sh
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "TIMESTAMP $(date "+%a %D %T.%2S")"
|
||||
SCRIPT_NAME="hw_test.sh"
|
||||
echo "Entering $SCRIPT_NAME"
|
||||
pwd
|
||||
|
||||
cd firmware
|
||||
echo "$SCRIPT_NAME: erasing first"
|
||||
sh flash_erase407.sh
|
||||
echo "$SCRIPT_NAME: trying to flash"
|
||||
# This script depends on someone else building firmware
|
||||
sh flash_openocd407.sh
|
||||
[ $? -eq 0 ] || { echo "ERROR invoking flash_openocd407.sh"; exit 1; }
|
||||
|
||||
[ -e build/rusefi.bin ] || { echo "FIRMWARE NOT FOUND"; exit 1; }
|
||||
|
||||
pwd
|
||||
|
||||
cd ..
|
||||
|
||||
# echo Running some commands
|
||||
# pwd
|
||||
# java -cp java_console_binary\rusefi_console.jar com.rusefi.CmdLine "set_led_blinking_period 10"
|
||||
|
||||
cd java_console
|
||||
|
||||
echo "Running tests"
|
||||
which java
|
||||
which javac
|
||||
ant realtest
|
||||
|
||||
[ $? -eq 0 ] || { echo "ERROR DETECTED"; exit 1; }
|
||||
|
||||
echo "TIMESTAMP $(date "+%a %D %T.%2S")"
|
||||
pwd
|
||||
echo "exiting $SCRIPT_NAME"
|
|
@ -1,17 +1,2 @@
|
|||
|
||||
call misc/jenkins/functional_test_and_build_bundle/build_current_bundle.bat
|
||||
IF NOT ERRORLEVEL 0 echo build ERROR DETECTED
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
|
||||
rem call misc/jenkins/functional_test_and_build_bundle/simulator_test.bat
|
||||
rem IF NOT ERRORLEVEL 0 echo simulator test ERROR DETECTED
|
||||
rem IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
|
||||
rem Here we use last version of firmware produced by 'clean_compile_two_versions.bat'
|
||||
|
||||
call misc/jenkins/functional_test_and_build_bundle/hw_test.bat
|
||||
IF NOT ERRORLEVEL 0 echo real hardware test ERROR DETECTED
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
@echo off
|
||||
sh.exe misc/jenkins/functional_test_and_build_bundle/run.sh
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
sh misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
|
||||
[ $? -eq 0 ] || { echo "build ERROR DETECTED"; exit 1; }
|
||||
|
||||
# sh misc/jenkins/functional_test_and_build_bundle/simulator_test.sh
|
||||
# [ $? -eq 0 ] || { echo "simulator test ERROR DETECTED"; exit 1; }
|
||||
|
||||
# Here we use last version of firmware produced by 'clean_compile_two_versions.bat'
|
||||
|
||||
if [ ! "$RUSEFI_SKIP_HW" ] || [ "$RUSEFI_SKIP_HW" = "false" ]; then
|
||||
sh misc/jenkins/functional_test_and_build_bundle/hw_test.sh
|
||||
[ $? -eq 0 ] || { echo "real hardware test ERROR DETECTED"; exit 1; }
|
||||
fi
|
|
@ -1,15 +1,2 @@
|
|||
echo I am simulator_test.bat
|
||||
pwd
|
||||
|
||||
cd java_console
|
||||
|
||||
echo Running simulator functional test
|
||||
which java
|
||||
which javac
|
||||
ant simlator_test
|
||||
|
||||
IF NOT ERRORLEVEL 0 echo ERROR DETECTED
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
echo "TIMESTAMP %date% %time%"
|
||||
echo simulator_test.bat: done
|
||||
@echo off
|
||||
sh.exe misc/jenkins/functional_test_and_build_bundle/simulator_test.sh
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "I am simulator_test.sh"
|
||||
pwd
|
||||
|
||||
cd java_console
|
||||
|
||||
echo "Running simulator functional test"
|
||||
which java
|
||||
which javac
|
||||
ant simlator_test
|
||||
[ $? -eq 0 ] || { echo "ERROR DETECTED"; exit 1; }
|
||||
|
||||
echo "TIMESTAMP $(date "+%a %D %T.%2S")"
|
||||
echo "simulator_test.sh: done"
|
|
@ -1,23 +1,2 @@
|
|||
|
||||
echo Should be executed from project root folder. Will try to upload to %RUSEFI_FTP_SERVER%
|
||||
|
||||
rem ibom is part of Doxygen job simply in order to reduce workspace HDD usage on my tiny build server
|
||||
call misc\jenkins\InteractiveHtmlBom\run.bat
|
||||
echo Uploading IBOMs
|
||||
ncftpput -R -v -u %RUSEFI_DOXYGEN_FTP_USER% -p %RUSEFI_DOXYGEN_FTP_PASS% %RUSEFI_FTP_SERVER% /ibom hardware/ibom/*
|
||||
|
||||
pwd
|
||||
cd firmware
|
||||
|
||||
doxygen
|
||||
IF NOT ERRORLEVEL 0 echo doxygen run FAILED
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
|
||||
|
||||
rem http://www.ncftp.com/download/
|
||||
rem actually Cygwin http://rusefi.com/wiki/index.php?title=Internal:Software:Build_Server
|
||||
cd ../doxygen
|
||||
echo Uploading Doxygen
|
||||
ncftpput -R -v -u %RUSEFI_DOXYGEN_FTP_USER% -p %RUSEFI_DOXYGEN_FTP_PASS% %RUSEFI_FTP_SERVER% /html html/*
|
||||
IF NOT ERRORLEVEL 0 echo upload FAILED
|
||||
IF NOT ERRORLEVEL 0 EXIT /B 1
|
||||
@echo off
|
||||
sh.exe misc\jenkins\generate_doxygen\gen_upload_docs.sh
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Should be executed from project root folder. Will try to upload to $RUSEFI_FTP_SERVER"
|
||||
|
||||
# ibom is part of Doxygen job simply in order to reduce workspace HDD usage on my tiny build server
|
||||
sh misc/jenkins/InteractiveHtmlBom/run.sh
|
||||
echo "Uploading IBOMs"
|
||||
ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /ibom hardware/ibom/*
|
||||
|
||||
pwd
|
||||
cd firmware
|
||||
|
||||
doxygen || { echo "doxygen run FAILED"; exit 1; }
|
||||
|
||||
# http://www.ncftp.com/download/
|
||||
# actually Cygwin http://rusefi.com/wiki/index.php?title=Internal:Software:Build_Server
|
||||
cd ../doxygen
|
||||
echo "Uploading Doxygen"
|
||||
ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /html html/*
|
||||
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }
|
|
@ -17,12 +17,12 @@
|
|||
<configVersion>2</configVersion>
|
||||
<userRemoteConfigs>
|
||||
<hudson.plugins.git.UserRemoteConfig>
|
||||
<url>https://github.com/rusefi/rusefi</url>
|
||||
<url>https://github.com/chuckwagoncomputing/rusefi</url>
|
||||
</hudson.plugins.git.UserRemoteConfig>
|
||||
</userRemoteConfigs>
|
||||
<branches>
|
||||
<hudson.plugins.git.BranchSpec>
|
||||
<name>*/master</name>
|
||||
<name>*/testing-primary</name>
|
||||
</hudson.plugins.git.BranchSpec>
|
||||
</branches>
|
||||
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
|
||||
|
@ -81,4 +81,4 @@
|
|||
</org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter>
|
||||
</publishers>
|
||||
<buildWrappers/>
|
||||
</project>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue