forked from Imagelibrary/rtems
libtest: Improve gcov info dump
Make sure there is no spurious empty line between the gcov info and the *** END OF GCOV INFO BASE64 *** line. This helps to recalculate the hash correctly at the consumer side.
This commit is contained in:
@@ -102,5 +102,9 @@ void _Gcov_Dump_info_base64( IO_Put_char put_char, void *arg )
|
||||
ctx.put_char = put_char;
|
||||
ctx.arg = arg;
|
||||
_Gcov_Dump_info( _Gcov_Base64_encode, &ctx );
|
||||
_Base64_Encode( _Gcov_Base64_put_char, &ctx, ctx.buf, ctx.index, NULL, INT_MAX );
|
||||
|
||||
if ( ctx.index > 0 ) {
|
||||
_Base64_Encode( put_char, arg, ctx.buf, ctx.index, NULL, INT_MAX );
|
||||
( *put_char )( '\n', arg );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,10 +75,8 @@ void rtems_test_gcov_dump_info( void )
|
||||
_IO_Printf( rtems_put_char, NULL, "\n*** BEGIN OF GCOV INFO BASE64 ***\n" );
|
||||
_Hash_Initialize( &gcov_hash );
|
||||
_Gcov_Dump_info_base64( gcov_put_char, NULL );
|
||||
_IO_Printf( rtems_put_char, NULL, "\n*** END OF GCOV INFO BASE64 ***\n" );
|
||||
byte = '\n';
|
||||
_Hash_Add_data( &gcov_hash, &byte, sizeof( byte ) );
|
||||
_Hash_Finalize( &gcov_hash, &result );
|
||||
_IO_Printf( rtems_put_char, NULL, "*** END OF GCOV INFO BASE64 ***\n" );
|
||||
_IO_Printf(
|
||||
rtems_put_char,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user