rusefi-1/misc/unit_tests.bat

49 lines
1.0 KiB
Batchfile
Raw Normal View History

2017-02-20 14:38:16 -08:00
echo I am unit_tests.bat
cd firmware
echo "CD to ${PWD}"
rm -fR .dep
rm -fR build
java -jar ../java_tools/version2header.jar
make
if not exist build/rusefi.hex echo FAILED TO COMPILE FIRMWARE
if not exist build/rusefi.hex exit -1
cd ..
2017-02-20 19:28:36 -08:00
echo We are in root folder
pwd
2017-02-20 14:38:16 -08:00
2017-02-20 19:28:36 -08:00
2017-02-20 14:38:16 -08:00
cd 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
2017-02-20 19:16:12 -08:00
echo Unit tests build looks good, now executing unit tests
2017-02-20 14:38:16 -08:00
cd build
call rusefi_test.exe
2017-02-20 19:32:05 -08:00
IF NOT ERRORLEVEL echo UNIT TEST FAILED
IF NOT ERRORLEVEL 0 EXIT /B 1
2017-02-20 14:38:16 -08:00
cd ..
2017-02-20 19:28:36 -08:00
cd ..
echo Back to root folder
pwd
2017-02-20 14:38:16 -08:00
2017-02-20 19:32:05 -08:00
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 Now uploading only firmware
ncftpput -u u71977750-build -p %RUSEFI_BUILD_FTP_PASS% rusefi.com separate_files firmware/build/rusefi_firmware.zip