nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
9.95k stars 1.28k forks source link

Improve error display on failure #2696

Closed JohanBertrand closed 2 months ago

JohanBertrand commented 2 months ago
Related Issue(s) https://github.com/nasa/fprime/issues/2695
Has Unit Tests (y/n) N/A
Documentation Included (y/n) N/A

Change Description

This is how the output is now looking like:

/home/fprime/ci/tests# ./Framework.bash 
Starting CI test /home/fprime Ref
Testing /home/fprime against fprime-util targets: generate generate --ut build build --all check --all
[INFO] FP Util in /home/fprime running generate
[INFO] FP Util in /home/fprime running generate --ut
[INFO] FP Util in /home/fprime running build with 78 jobs
[INFO] FP Util in /home/fprime running build --all with 78 jobs
[INFO] FP Util in /home/fprime running check --all with 78 jobs
---------------- ERROR ----------------
Failed to run 'check --all' in /home/fprime
---------------------------------------
---------------- STDOUT ---------------
[WARNING] /home/fprime/settings.ini does not exist
[  0%] Generating PolyDbEntryEnumAi.xml, ProcTypeEnumAi.xml
[  0%] Generating FppConstantsAc.cpp, FppConstantsAc.hpp, PolyDbEntryEnumAc.cpp, PolyDbEntryEnumAc.hpp, ProcTypeEnumAc.cpp, ProcTypeEnumAc.hpp
[  0%] Building CXX object F-Prime/STest/CMakeFiles/STest.dir/STest/Pick/Pick_default.cpp.o
[  0%] Building CXX object F-Prime/googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[  0%] Building C object F-Prime/STest/CMakeFiles/STest.dir/STest/Random/bsd_random.c.o
[  0%] Building CXX object F-Prime/STest/CMakeFiles/STest.dir/STest/Random/Random.cpp.o
[  0%] Building CXX object F-Prime/Os/Posix/CMakeFiles/Os_File_Posix.dir/File.cpp.o
[  0%] Building CXX object F-Prime/Os/Posix/CMakeFiles/Os_File_Posix.dir/errno.cpp.o
[...]
98% tests passed, 1 tests failed out of 58

Total Test time (real) =  31.10 sec

The following tests FAILED:
         14 - Svc_BufferLogger_ut_exe (Failed)
---------------------------------------
---------------- STDERR ---------------
Errors while running CTest
make[3]: *** [CMakeFiles/check.dir/build.make:70: CMakeFiles/check] Error 8
make[2]: *** [CMakeFiles/Makefile2:3097: CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3104: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:582: check] Error 2
[ERROR] CMake erred with return code 2
---------------------------------------
------------- END ERROR ---------------
Failed to run 'check --all' in /home/fprime
---------------------------------------

Rationale

This will make debugging more easy when an error happen on the CI.

Testing/Review Recommendations

N/A

Future Work

N/A