Skip to content

chore(ci): improved errors messages visibility

Found during debuggging of MR !3173 (merged) :

  1. There was a trailing && before $BUILD_OPTIONS in the command line
  2. Added leading lines and more pattern to the grep command that displays errors/warnings messages during docker build since we don't have access to all.txt if build fails

Example on Romain's MR:

$ grep -E -A3 "warning:|error:" all.txt 
/oai-ran/common/utils/T/T.h:15:10: fatal error: T_IDs.h: No such file or directory
   15 | #include "T_IDs.h"
      |          ^~~~~~~~~
compilation terminated.

and now:

$ grep -E -A5 -B5 "warning:|error:| Error " all.txt 
                 from /oai-ran/common/utils/nr/nr_common.h:39,
                 from /oai-ran/openair1/PHY/impl_defs_top.h:111,
                 from /oai-ran/openair1/PHY/defs_nr_common.h:36,
                 from /oai-ran/openair1/PHY/defs_gNB.h:37,
                 from /oai-ran/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c:27:
/oai-ran/common/utils/T/T.h:15:10: fatal error: T_IDs.h: No such file or directory
   15 | #include "T_IDs.h"
      |          ^~~~~~~~~
compilation terminated.
gmake[3]: *** [openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeFiles/nr_coding_segment_encoder.dir/build.make:76: openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeFiles/nr_coding_segment_encoder.dir/nrLDPC_coding_segment_encoder.c.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:8004: openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeFiles/nr_coding_segment_encoder.dir/all] Error 2
gmake[2]: *** Waiting for unfinished jobs....
[  1%] Building C object openair2/E2AP/flexric/src/lib/e2ap/v3_01/ie/asn/CMakeFiles/e2ap_asn1_obj.dir/CauseE2node.c.o
[  1%] Building C object ldpc/generator_cnProc_avx512/CMakeFiles/cnProc_gen_avx512.dir/main.c.o
[  1%] Building C object openair2/E2AP/flexric/src/sm/rc_sm/ie/ir/CMakeFiles/e2sm_rc_ir_obj.dir/param_report_def.c.o
[  1%] Building C object ldpc/generator_bnProc/CMakeFiles/bnProc_gen_avx2.dir/bnProc_gen_BG2_avx2.c.o
--
[ 41%] Building C object openair2/F1AP/MESSAGES/CMakeFiles/asn1_f1ap.dir/xer_decoder.c.o
[ 41%] Building C object openair2/F1AP/MESSAGES/CMakeFiles/asn1_f1ap.dir/xer_encoder.c.o
[ 41%] Building C object openair2/F1AP/MESSAGES/CMakeFiles/asn1_f1ap.dir/xer_support.c.o
[ 41%] Linking C static library libasn1_f1ap.a
[ 41%] Built target asn1_f1ap
gmake[1]: *** [CMakeFiles/Makefile2:4602: CMakeFiles/nr-softmodem.dir/rule] Error 2
gmake: *** [Makefile:930: nr-softmodem] Error 2

That will help debug without to build manually.

Merge request reports

Loading