rename test binary

This commit is contained in:
Matthew Kennedy 2023-04-11 16:26:15 -07:00
parent 28a27ab70e
commit cef6856f15
10 changed files with 18 additions and 18 deletions

View File

@ -47,7 +47,7 @@ jobs:
- name: Run Tests - name: Run Tests
working-directory: ./unit_tests/ working-directory: ./unit_tests/
run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/rusefi_test run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/fome_test
- name: Set FTP variables - name: Set FTP variables
env: env:
@ -79,4 +79,4 @@ jobs:
- name: Run Tests (Valgrind) - name: Run Tests (Valgrind)
if: ${{ matrix.os != 'macos-latest' }} if: ${{ matrix.os != 'macos-latest' }}
working-directory: ./unit_tests/ working-directory: ./unit_tests/
run: valgrind --error-exitcode=1 --exit-on-first-error=yes --leak-check=no --show-error-list=yes build/rusefi_test run: valgrind --error-exitcode=1 --exit-on-first-error=yes --leak-check=no --show-error-list=yes build/fome_test

View File

@ -102,7 +102,7 @@ jobs:
# - name: Run Tests # - name: Run Tests
# working-directory: ./unit_tests/ # working-directory: ./unit_tests/
# run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/rusefi_test # run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/fome_test
# # Commit changes and catch the error that occurs if nothing has been changed (without catching other errors) # # Commit changes and catch the error that occurs if nothing has been changed (without catching other errors)
# - name: Commit fresh triggers.txt # - name: Commit fresh triggers.txt

4
.vscode/launch.json vendored
View File

@ -8,7 +8,7 @@
"name": "Debug Unit Tests (gdb)", "name": "Debug Unit Tests (gdb)",
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/unit_tests/build/rusefi_test", "program": "${workspaceFolder}/unit_tests/build/fome_test",
// uncomment args below to only debug a particular test // uncomment args below to only debug a particular test
//"args": ["--gtest_filter=etb.testTargetTpsIsFloatBug945"], //"args": ["--gtest_filter=etb.testTargetTpsIsFloatBug945"],
"stopAtEntry": false, "stopAtEntry": false,
@ -46,7 +46,7 @@
"name": "Debug Unit Tests (lldb)", "name": "Debug Unit Tests (lldb)",
"type": "lldb", "type": "lldb",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/unit_tests/build/rusefi_test", "program": "${workspaceFolder}/unit_tests/build/fome_test",
"args": [], "args": [],
"cwd": "${workspaceFolder}/unit_tests/build/", "cwd": "${workspaceFolder}/unit_tests/build/",
}, },

View File

@ -506,7 +506,7 @@ typedef enum {
// do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt // do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt
// todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic // todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic
// //
// Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests // Another point: once you add a new trigger, run get_trigger_images.bat which would run fome_test.exe from unit_tests
// //
TT_UNUSED = 75, // this is used if we want to iterate over all trigger types TT_UNUSED = 75, // this is used if we want to iterate over all trigger types

View File

@ -4,15 +4,15 @@ rem and later manually published at https://rusefi.com/images/triggers/
cd ../unit_tests cd ../unit_tests
make -j4 make -j4
if not exist build/rusefi_test.exe echo UNIT TEST COMPILATION FAILED if not exist build/fome_test.exe echo UNIT TEST COMPILATION FAILED
if not exist build/rusefi_test.exe exit -1 if not exist build/fome_test.exe exit -1
rem This is me using Cygwin on all my Windows devices rem This is me using Cygwin on all my Windows devices
ls -l build/rusefi_test.exe ls -l build/fome_test.exe
del triggers.txt del triggers.txt
build\rusefi_test.exe build\fome_test.exe
pwd pwd
if not exist triggers.txt echo triggers.txt generation FAILED if not exist triggers.txt echo triggers.txt generation FAILED

View File

@ -21,7 +21,7 @@
rm -fR .dep rm -fR .dep
rm -fR build rm -fR build
make make
if [ ! -f build/rusefi_test ]; then if [ ! -f build/fome_test ]; then
echo "test compilation failed" echo "test compilation failed"
exit -1 exit -1
fi fi
@ -30,7 +30,7 @@
set -e set -e
# invoke the tests - hopefully error code would be propagated? # invoke the tests - hopefully error code would be propagated?
build/rusefi_test build/fome_test
cd "${WORKSPACE}/java_console" cd "${WORKSPACE}/java_console"
echo "CD to ${PWD}" echo "CD to ${PWD}"

View File

@ -1,8 +1,8 @@
TL, DR: just follow [tests](tests) folder as examples. TL, DR: just follow [tests](tests) folder as examples.
1. Run 'make' to build desktop binary. 1. Run 'make' to build desktop binary.
1. Execute rusefi_test binary on your PC/Mac, it's expected to say SUCCESS and not fail :) Googletest will also print results summary. 1. Execute fome_test binary on your PC/Mac, it's expected to say SUCCESS and not fail :) Googletest will also print results summary.
1. To run only one test uncomment and modify [main.cpp](https://github.com/rusefi/rusefi/blob/master/unit_tests/main.cpp) line ``::testing::GTEST_FLAG(filter)`` 1. To run only one test, run like this: `build/fome_test --gtest_filter=MyTestName`
In this folder we have rusEFI unit tests using https://github.com/google/googletest In this folder we have rusEFI unit tests using https://github.com/google/googletest

View File

@ -2,5 +2,5 @@
make clean make clean
make -j6 make -j6
build/rusefi_test build/fome_test
bash ci_gcov.sh "$RUSEFI_DOXYGEN_FTP_USER" "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" bash ci_gcov.sh "$RUSEFI_DOXYGEN_FTP_USER" "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# This script runs every test in its own process (own invocation of rusefi_test executable) # 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 # This allows us to test for accidental cross-test leakage that fixes/breaks something
set -e set -e
@ -9,7 +9,7 @@ export GTEST_TOTAL_SHARDS=600
for IDX in {0..599} for IDX in {0..599}
do do
export GTEST_SHARD_INDEX=$IDX export GTEST_SHARD_INDEX=$IDX
build/rusefi_test build/fome_test
done done
unset GTEST_TOTAL_SHARDS unset GTEST_TOTAL_SHARDS

View File

@ -205,7 +205,7 @@ endif
############################################################################## ##############################################################################
# Define project name here # Define project name here
PROJECT = rusefi_test PROJECT = fome_test
ifeq ("$(wildcard $(UNIT_TESTS_DIR)/googletest/LICENSE)","") ifeq ("$(wildcard $(UNIT_TESTS_DIR)/googletest/LICENSE)","")
$(info Invoking "git submodule update --init") $(info Invoking "git submodule update --init")