[sheepdog] [PATCH v2 0/3] Introducing unittest framework to sheepdog
MORITA Kazutaka
morita.kazutaka at gmail.com
Fri Jun 7 01:34:51 CEST 2013
At Thu, 6 Jun 2013 19:19:39 +0800,
Kai Zhang wrote:
>
> v2:
> - fixed compile error
> - add --enable-unittest to ./configure options
> don't check "check" if run ./configure without --enable-unittest or --enable-coverage
> - update usage
>
> As we all known, unittest is quite important to any project which is aimed to be used in production environment.
>
> This series of patches is to introduce 'check', a popular unittest framework for C language.
>
> These patches are quite initial implemented.
> But it still shows the abilities of:
> - adding more unittests easily
> - runing unittests selectively
> - showing code coverage after running unittest
> - generating html report by lcov and genhtml
> - integrating with other CI (continuous integration) systems like Jenkins
>
> In addition, we can also benifit from unittest in the following ways:
> - help us write more testable code
> - improve the robustness of sheepdog
> - new contributors can be quickly involved by writing unittest code
>
> Usage:
> - ./autogen.sh
> - ./configure --enable-unittest --enable-coverage
> - $make check # run all unittests
I still see a compile error.
Making check in unittest
make[1]: Entering directory `/home/kazutaka/git/sheepdog/unittest'
Making check in collie
make[2]: Entering directory `/home/kazutaka/git/sheepdog/unittest/collie'
make test_common
make[3]: Entering directory `/home/kazutaka/git/sheepdog/unittest/collie'
CC test_common.o
CC mock_collie.o
CC common.o
CCLD test_common
../../lib/libsheepdog.a(work.o): In function `create_worker_threads':
/home/kazutaka/git/sheepdog/lib/work.c:139: undefined reference to `pthread_create'
../../lib/libsheepdog.a(work.o): In function `worker_routine':
/home/kazutaka/git/sheepdog/lib/work.c:225: undefined reference to `pthread_detach'
collect2: ld returned 1 exit status
make[3]: *** [test_common] Error 1
More information about the sheepdog
mailing list