fome-fw/misc/jenkins/unit_tests/unit_tests.bat

57 lines
1.3 KiB
Batchfile
Raw Normal View History

echo "TIMESTAMP %date% %time% I am unit_tests.bat"
2017-08-29 19:14:38 -07:00
set FTP_SERVER=home451478433.1and1-data.host
2018-12-15 19:23:05 -08:00
rem 'RUSEFI_BUILD_FTP_PASS' environment variable
echo We should be in root folder
pwd
rem Prior to running unit tests we build real hardware firmware
2017-08-29 19:05:33 -07:00
cd firmware
2017-04-06 17:53:50 -07:00
git submodule update --init
rm -fR .dep
rm -fR build
2017-04-06 17:53:50 -07:00
call update_version.bat
make -j4
if not exist build/rusefi.hex echo FAILED TO COMPILE FIRMWARE
if not exist build/rusefi.hex exit -1
cd ..
echo We are in root folder
pwd
cd unit_tests
2018-12-15 19:23:05 -08:00
rem Only here we are building unit_tests
call compile.bat
pwd
ls -l build
if not exist build/rusefi_test.exe echo FAILED TO COMPILE UNIT TESTS
if not exist build/rusefi_test.exe exit -1
echo "TIMESTAMP %date% %time% Unit tests build looks good, now executing unit tests"
cd build
call rusefi_test.exe
IF NOT ERRORLEVEL echo UNIT TEST FAILED
IF NOT ERRORLEVEL 0 EXIT /B 1
cd ..
cd ..
echo Back to root folder
pwd
echo Preparing firmware-only fast upload
zip -j firmware/build/rusefi_firmware.zip firmware/svnversion.h firmware/build/rusefi.hex firmware/build/rusefi.bin firmware/build/rusefi.elf firmware/tunerstudio/rusefi.ini
echo "TIMESTAMP %date% %time% Now uploading only firmware
2017-08-29 19:05:33 -07:00
ncftpput -u u71977750-build -p %RUSEFI_BUILD_FTP_PASS% %FTP_SERVER% separate_files firmware/build/rusefi_firmware.zip