berry-lang/berry

Error in tests

Closed this issue · 3 comments

bash-5.2$ make test
[Run Testcases...]
geninfo: WARNING: no .gcno files found in . - skipping!
run testcase: virtual_methods2.be
run testcase: virtual_methods.be
run testcase: vararg.be
run testcase: super_leveled.be
run testcase: super_auto.be
run testcase: suffix.be
run testcase: subobject.be
run testcase: string.be
run testcase: relop.be
run testcase: reference.be
run testcase: overload.be
123
run testcase: os.be
run testcase: module.be
run testcase: member_indirect.be
run testcase: math.be
run testcase: map.be
run testcase: list.be
run testcase: lexergc.be
run testcase: lexer.be
run testcase: json.be
run testcase: introspect_ismethod.be
run testcase: introspect.be
run testcase: int.be
run testcase: global.be
run testcase: function.be
run testcase: for.be
run testcase: exceptions.be
run testcase: debug.be
value type , attributes:
run testcase: cond_expr.be
run testcase: compound.be
run testcase: compiler.be
run testcase: closure.be
run testcase: class_static.be
run testcase: class_const.be
run testcase: class.be
run testcase: checkspace.be
run testcase: call.be
run testcase: bytes_fixed.be
run testcase: bytes_b64.be
run testcase: bytes.be
run testcase: bool.be
run testcase: bitwise.be
run testcase: assignment.be
test results: 43 total, 0 failed (all tests passed).
geninfo: WARNING: no .gcda files found in ./ - skipping!
lcov: ERROR: no valid records found in tracefile init.info
make: *** [Makefile:57: test] Error 255

You need to do make clean before make test to force compilation with special options

Better but not good (2 warnings):

bash-5.2$ make clean
[Clean...]
done
bash-5.2$ make test
[Prebuild] generate resources
[Compile] src/be_api.c
[Compile] src/be_baselib.c
[Compile] src/be_bytecode.c
[Compile] src/be_byteslib.c
src/be_byteslib.c: En la función ‘m_setbytes’:
src/be_byteslib.c:971:25: aviso: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int32_t’ {también conocido como ‘int’} [-Wsign-compare]
971 | if ((size_t)idx >= attr.len) { idx = attr.len; }
| ^~
src/be_byteslib.c:984:26: aviso: comparison of integer expressions of different signedness: ‘int32_t’ {también conocido como ‘int’} and ‘size_t’ {también conocido como ‘long unsigned int’} [-Wsign-compare]
984 | if (from_len >= from_len_total) { from_len = from_len_total; }
| ^~
src/be_byteslib.c:986:45: aviso: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int32_t’ {también conocido como ‘int’} [-Wsign-compare]
986 | if ((size_t) idx + (size_t)from_len >= attr.len) { from_len = attr.len - idx; }
| ^~
[Compile] src/be_class.c
[Compile] src/be_code.c
[Compile] src/be_debug.c
src/be_debug.c: En la función ‘be_print_inst’:
src/be_debug.c:140:12: aviso: la salida ‘snprintf’ podría truncarse antes del último carácter de formato [-Wformat-truncation=]
140 | logbuf("%s\n", __lbuf);
| ^~~~~~
src/be_debug.c:30:58: nota: en definición de macro ‘logbuf’
30 | #define logbuf(...) snprintf(__lbuf, sizeof(__lbuf), VA_ARGS)
| ^~~~~~~~~~~
src/be_debug.c:140:17: nota: la cadena de formato se definió aquí
140 | logbuf("%s\n", __lbuf);
| ^
src/be_debug.c:30:25: nota: ‘snprintf’ manda entre 2 y 97 bytes a un destino de tamaño 96
30 | #define logbuf(...) snprintf(__lbuf, sizeof(__lbuf), VA_ARGS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/be_debug.c:140:5: nota: en expansión de macro ‘logbuf’
140 | logbuf("%s\n", __lbuf);
| ^~~~~~
src/be_debug.c:30:25: aviso: ‘snprintf’ argument 4 overlaps destination object ‘__lbuf’ [-Wrestrict]
30 | #define logbuf(...) snprintf(__lbuf, sizeof(__lbuf), VA_ARGS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/be_debug.c:140:5: nota: en expansión de macro ‘logbuf’
140 | logbuf("%s\n", __lbuf);
| ^~~~~~
src/be_debug.c:52:10: nota: destination object referenced by ‘restrict’-qualified argument 1 was declared here
52 | char __lbuf[INST_BUF_SIZE];
| ^~~~~~
[Compile] src/be_debuglib.c
[Compile] src/be_exec.c
[Compile] src/be_filelib.c
[Compile] src/be_func.c
[Compile] src/be_gc.c
[Compile] src/be_gclib.c
[Compile] src/be_globallib.c
[Compile] src/be_introspectlib.c
[Compile] src/be_jsonlib.c
[Compile] src/be_lexer.c
[Compile] src/be_libs.c
[Compile] src/be_list.c
[Compile] src/be_listlib.c
[Compile] src/be_map.c
[Compile] src/be_maplib.c
[Compile] src/be_mathlib.c
[Compile] src/be_mem.c
[Compile] src/be_module.c
[Compile] src/be_object.c
[Compile] src/be_oslib.c
[Compile] src/be_parser.c
[Compile] src/be_rangelib.c
[Compile] src/be_repl.c
[Compile] src/be_solidifylib.c
[Compile] src/be_strictlib.c
[Compile] src/be_string.c
[Compile] src/be_strlib.c
[Compile] src/be_syslib.c
[Compile] src/be_timelib.c
[Compile] src/be_undefinedlib.c
[Compile] src/be_var.c
[Compile] src/be_vector.c
[Compile] src/be_vm.c
[Compile] default/be_modtab.c
[Compile] default/be_port.c
[Compile] default/berry.c
[Linking...]
done
[Run Testcases...]
/tmp/berry/src/be_undefinedlib.gcno:no functions found
geninfo: WARNING: GCOV did not produce any data for /tmp/berry/src/be_undefinedlib.gcno
/tmp/berry/default/be_modtab.gcno:no functions found
geninfo: WARNING: GCOV did not produce any data for /tmp/berry/default/be_modtab.gcno
run testcase: virtual_methods2.be
run testcase: virtual_methods.be
run testcase: vararg.be
run testcase: super_leveled.be
run testcase: super_auto.be
run testcase: suffix.be
run testcase: subobject.be
run testcase: string.be
run testcase: relop.be
run testcase: reference.be
run testcase: overload.be
123
run testcase: os.be
run testcase: module.be
run testcase: member_indirect.be
run testcase: math.be
run testcase: map.be
run testcase: list.be
run testcase: lexergc.be
run testcase: lexer.be
run testcase: json.be
run testcase: introspect_ismethod.be
run testcase: introspect.be
run testcase: int.be
run testcase: global.be
run testcase: function.be
run testcase: for.be
run testcase: exceptions.be
run testcase: debug.be
value type , attributes:
run testcase: cond_expr.be
run testcase: compound.be
run testcase: compiler.be
run testcase: closure.be
run testcase: class_static.be
run testcase: class_const.be
run testcase: class.be
run testcase: checkspace.be
run testcase: call.be
run testcase: bytes_fixed.be
run testcase: bytes_b64.be
run testcase: bytes.be
run testcase: bool.be
run testcase: bitwise.be
run testcase: assignment.be
test results: 43 total, 0 failed (all tests passed).
Reading tracefile total.info
Deleted 0 files
Writing data to final.info
Summary coverage rate:
lines......: 70.9% (6965 of 9829 lines)
functions..: 74.9% (731 of 976 functions)
branches...: no data found

Ok, this is right, there are not functions in these files.