CUnit和lcov安裝和使用

2021-10-12 12:51:45 字數 3509 閱讀 1509

解壓縮

tar jxvf cunit-2.1-3.tar.bz2

cd cunit-2.1-3

安裝相關工具

sudo apt install libtool
root# aclocal

warning : aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'。

解決辦法:

可以不用理會,或者將configure.in改名為configure.ac

autoconf    ( 注:autoconf 是用來生成自動配置軟體源**指令碼(configure)的 工具)
root# automake

error:

required file 'config.h.in' not found

解決辦法:

root# autoheader

error:

required file './compile' not found

參考:

解決辦法:

root# automake --add-missing
root# ./configure

error:

sed: can't read ./ltmain.sh: no such file or directory

mv: cannot stat 'libtoolt': no such file or directory

cp: cannot stat 'libtoolt': no such file or directory

chmod: cannot access 'libtool': no such file or directory

解決辦法

root# libtoolize --automake --copy --debug --force

root# ./configure

root# make

error:

configure.in:158: error: required file './compile' not found

configure.in:158: 'automake --add-missing' can install 'compile'

configure.in:4: error: required file './missing' not found

configure.in:4: 'automake --add-missing' can install 'missing'

automake-1.15: warning: autoconf input should be named 'configure.ac', not 'configure.in'

cunit/sources/automated/makefile.am: error: required file './depcomp' not found

cunit/sources/automated/makefile.am: 'automake --add-missing' can install 'depcomp'

cunit/sources/framework/makefile.am:20: warning: '%'-style pattern rules are a gnu make extension

cunit/sources/test/makefile.am:12: warning: 'includes' is the old name for 'am_cppflags' (or '*_cppflags')

examples/automatedtest/makefile.am:13: warning: 'includes' is the old name for 'am_cppflags' (or '*_cppflags')

examples/basictest/makefile.am:13: warning: 'includes' is the old name for 'am_cppflags' (or '*_cppflags')

examples/consoletest/makefile.am:13: warning: 'includes' is the old name for 'am_cppflags' (or '*_cppflags')

examples/cursestest/makefile.am:13: warning: 'includes' is the old name for 'am_cppflags' (or '*_cppflags')

makefile:404: recipe for target 'makefile.in' failed

make: *** [makefile.in] error 1

解決辦法:

root# automake --add-missing

root# make

root# make install
需要超級使用者許可權

檢測安裝完成

root# ls /usr/local/lib/libcunit.so
將/usr/local/lib加入動態庫路徑,確保程式執行時,能夠鏈結

centos 7

1. 安裝命令

sudo yum install lcov
2. bug

缺少perl

root# lcov --rc lcov_branch_coverage=1 -c -d $(dir_src) -o $(coverage_file)

can't locate io/uncompress/gunzip.pm in @inc (@inc contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/geninfo line 62.

begin failed--compilation aborted at /usr/local/bin/geninfo line 62.

解決方案

根據io/uncompress/gunzip.pm可以知道缺少perl包,通過命令安裝對應包即可。

a. 搜尋對應資訊,發現在該網頁中有對應資源。

b. 推測是缺少perl包,根據路徑,通過yum install perl-進行聯想,得到對應的包

sudo yum install perl-io-compress.noarch

安裝和使用Clouda

1 安裝clouda 開啟cmd,用cmd進入node.js安裝的根目錄。我的node.js的根目錄是 然後輸入如下指令 回車,完成clouda的安裝。2 使用clouda建立工程 同樣是開啟cmd,用cmd進入node.js安裝的根目錄。然後輸入如下指令 完成名就myproject這個工程的建立。...

pip安裝和使用

pip用來管理和安裝python包非常方便。怎麼簡單介紹下如何安裝pip以及pip常用命令的使用 curl o python get pip.py 顯示如下資訊,表示安裝成功 downloading unpacking pip downloading pip 1.5.2 py2.py3 none a...

repcached安裝和使用

b 在測試虛擬機器nosql1和nosql2上分別安裝repcached root nosql1 tar xzf memcached 1.2.8 repcached 2.2.1.tar.gz root nosql1 yum install libevent devel root nosql1 cd ...