跳至主要内容

博文

目前显示的是 七月, 2020的博文

lcov DS checksum golang code

srcstr := filecontent[i- 1 ] srcstr = strings . TrimRight (srcstr , " \r\n " ) srcstr = strings . TrimRight (srcstr , " \n " ) h := md5 . New () h. Write ([] byte (srcstr)) md5str := base64 .URLEncoding. EncodeToString (h. Sum ( nil )) md5str = strings . TrimRight (md5str , "==" ) md5str = strings . Replace (md5str , "_" , "/" , - 1 ) md5str = strings . Replace (md5str , "-" , "+" , - 1 )

lcov --diff usage

# Pathnames in the diff file need to be absolute (note # to self: document) diff -u $(PWD)/hello_old.c $(PWD)/hello_new.c > difffile # Without --convert-filenames, the data from RUN1 will # still be associated with hello_old.c lcov --diff RUN1.INFO difffile --convert-filenames -o RUN1_CONVERTED.INFO 然后修改RUN1_CONVERTED.INFO的TN和SF,与RUN2.INFO一致 # Add data from both runs lcov -a RUN1_CONVERTED.INFO -a RUN2.INFO -o RUN_ALL.INFO oldfile newfile merge old coverage to newfile merge all coverage result