2019-04-20 14:27:04 -07:00
|
|
|
echo "TIMESTAMP %date% %time% I am unit_tests.bat"
|
2017-03-24 10:49:18 -07:00
|
|
|
|
2019-07-07 14:26:47 -07:00
|
|
|
rem 'RUSEFI_BUILD_FTP_PASS' environment variable
|
2018-12-15 19:23:05 -08:00
|
|
|
|
|
|
|
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
|
|
|
|
2017-04-06 17:53:50 -07:00
|
|
|
git submodule update --init
|
|
|
|
|
2020-06-18 10:27:24 -07:00
|
|
|
cd firmware
|
2017-04-06 17:53:50 -07:00
|
|
|
call update_version.bat
|
2019-07-01 09:22:58 -07:00
|
|
|
IF NOT ERRORLEVEL 0 echo ERROR: INVOKING VERSION HEADER GENERATOR
|
2019-06-01 06:11:01 -07:00
|
|
|
IF NOT ERRORLEVEL 0 EXIT /B 1
|
2020-06-18 10:27:24 -07:00
|
|
|
cd ..
|
2017-03-24 10:49:18 -07:00
|
|
|
|
|
|
|
echo We are in root folder
|
|
|
|
pwd
|
|
|
|
|
|
|
|
cd unit_tests
|
2021-05-16 05:51:36 -07:00
|
|
|
rem Clean build is needed since some file renames would produce a broken incremental build
|
2017-03-24 10:49:18 -07:00
|
|
|
|
2018-12-15 19:23:05 -08:00
|
|
|
rem Only here we are building unit_tests
|
2021-10-13 18:09:11 -07:00
|
|
|
call clean_compile.bat
|
2017-03-24 10:49:18 -07:00
|
|
|
pwd
|
|
|
|
ls -l build
|
2019-07-01 09:22:58 -07:00
|
|
|
if not exist build/rusefi_test.exe echo ERROR: FAILED TO COMPILE UNIT TESTS
|
2017-03-24 10:49:18 -07:00
|
|
|
if not exist build/rusefi_test.exe exit -1
|
|
|
|
|
2019-04-20 14:27:04 -07:00
|
|
|
echo "TIMESTAMP %date% %time% Unit tests build looks good, now executing unit tests"
|
2017-03-24 10:49:18 -07:00
|
|
|
|
2021-05-24 05:56:24 -07:00
|
|
|
call build\rusefi_test.exe
|
2019-07-01 09:22:58 -07:00
|
|
|
IF NOT ERRORLEVEL 0 echo ERROR: UNIT TEST FAILED
|
2017-03-24 10:49:18 -07:00
|
|
|
IF NOT ERRORLEVEL 0 EXIT /B 1
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo Back to root folder
|
|
|
|
pwd
|
|
|
|
|