CUnit是一個用C語言編寫、管理和運行單元測試的輕量級系統,它爲C程序員提供了具備靈活多樣用戶界面的基本測試功能。html
CUnit是做爲一個靜態庫構建的,它與用戶的測試代碼連接在一塊兒。它使用一個簡單的框架來構建測試結構,併爲測試公共數據類型提供了一組豐富的斷言。此外,還爲運行測試和報告結果提供了幾個不一樣的接口。這些接口目前包括:
1.自動輸出到xml文件
2.非交互式基本靈活編程界面
3.非交互式控制檯界面
4.交互式圖形界面(Unix)程序員
CUint官網:http://cunit.sourceforge.net/
CUnit幫助文檔:http://cunit.sourceforge.net/documentation.html編程
解決 configure.ac:17: error: possibly undefined macro: AC_PROG_LIBTOOL框架
sudo apt-get install libtool sudo apt-get install libsysfs-dev
一 安裝:
CUnit-2.1-3.tar.bz2下載ide
tar jxvf CUnit-2.1-3.tar.bz2 mv CUnit-2.1-3 CUnit cd CUnit aclocal (顯示沒安裝的話 sudo apt install aclocal 下面也是) autoheader autoconf(解決 configure.ac:17: error: possibly undefined macro: AC_PROG_LIBTOOL 看上面) automake ./configure make sudo make install
檢查安裝成功沒有: ls /usr/local/lib/libcunit.so