[Crossfire-wiki] [Crossfire DokuWiki] page added: dev:check

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Wed Apr 17 21:38:52 CDT 2013


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2013/04/17 21:38
User        : kbulgrien
Edit Summary: created instructions for manually installing the check framework.

====== Check: A unit test framework for C ======
The Crossfire project specifies that developers shall create and run unit tests built with the check framework. The framework is often not packaged by Linux distributions, but it is not hard to install.

===== Installation =====

If the Linux distribution in use has the check framework packaged, use the distribution's customary method of adding packages, otherwise, install the tool as follows, or in a suitably similar manner:

  - Download the latest tarball from [[http://sourceforge.net/projects/check/files/|SourceForge]]<code>
  $ mkdir -p ~/devel/check
  $ cd ~/devel/check
  $ wget http://sourceforge.net/projects/check/files/check/0.9.9/check-0.9.9.tar.gz/download
  $ mv download check-0.9.9.tar.gz</code>
  - Unpack the tarball.<code>
  $ tar -xzf check-0.9.9.tar.gz</code>
  - Compile the framework.<code>
  $ cd check-*
  $ ./configure --prefix=/usr/local
  $ make</code>
  - Install the framework.<code>
  $ sudo make install</code>
  - As needed, modify the user environment to establish /usr/local/bin in the default run path.  In BASH, the following is viable:<code>
  if ! which checkmk; then \
    echo -e "\nexport PATH=\"\$\{PATH\}:/usr/local/bin\""; \
  fi >>~/.bash_profile
  . ~/.bash_profile</code>
  - As needed, modify the user environment to establish the location of the check.pc file.  In BASH, following is viable:<code>
  if pkg-config --uninstalled check; then \
    echo -e "\nexport PKG_CONFIG_PATH=\"\$\{PKG_CONFIG_PATH\}:/usr/local/lib/pkgconfig\""; \
    echo -e "export LD_LIBRARY_PATH=\"\$\{LD_LIBRARY_PATH\}:/usr/local/lib\"\n"; \
  fi >>~/.bash_profile
  . ~/.bash_profile</code>

===== Verification =====

If the check framework is installed correctly, the server ''./configure'' or ''autogen.sh'' output should include:<code>
  configure:     Will process unit testing?           yes (will generate report)
  configure:       (run make; make -k check)
  configure:</code>


IP-Address  : 70.254.43.42
Old Revision: none
New Revision: http://wiki.metalforge.net/doku.php/dev:check

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/



More information about the crossfire-wiki mailing list