How to test unit tests in HIPL?

Asked by Miika Komu

Currently, it appears that HIPL unit tests are not being run:

# TOTAL: 0
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0

How to actually run them?

Question information

Language:
English Edit question
Status:
Solved
For:
HIPL Edit question
Assignee:
No assignee Edit question
Solved by:
Miika Komu
Solved:
Last query:
Last reply:
Revision history for this message
Miika Komu (miika-iki) said :
#1

"make check" runs unit tests in HIPL. According to the following information, at least Ubuntu 14.04 ships with an outdated version of the check library:

https://sourceforge.net/p/check/mailman/message/34265575/

You can see this also in config.log after running ./configure:

configure:11926: checking for suite_create in -lcheck
configure:11951: gcc -o conftest -g -O2 conftest.c -lcheck -lm -lcrypto >&5
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_pack.o): In function `ppack':
(.text+0x51d): undefined reference to `__pthread_register_cancel'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_pack.o): In function `ppack':
(.text+0x551): undefined reference to `__pthread_unregister_cancel'
collect2: error: ld returned 1 exit status

As suggested in the email thread, you can install check from the sources as follows:

sudo apt-get remove check
wget http://netix.dl.sourceforge.net/project/check/check/0.10.0/check-0.10.0.tar.gz
tar xvzf check-0.10.0.tar.gz
./configure && make
sudo make install

Revision history for this message
Miika Komu (miika-iki) said :
#2

NOTE: make sure to run...

  sudo ldconfig

...before actual unit testing:

  ./configure && make check # running configure is mandatory!