Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Set Up and Installation

Glenn Scott edited this page Jul 25, 2016 · 2 revisions

How to install, configure, link, and run LongBow.

Configuration

LongBow with LLDB

Set the following lines in your ~/.lldbinit file:

settings set target.inline-breakpoint-strategy always
process handle -p true -s false SIGABRT

LongBow with GDB

LongBow uses signals to interrupt program flow when an assertion fails. When using gdb this will cause gdb to stop running of the test. This probably isn't what you want and would rather prefer that gdb just ignore the signal and let the LongBow unit test signal handler take care of the signal. To do this, you must configure gdb to ignore the signal and to allow it to pass to the program being executed. In the file {\tt ~/.gdbinit}, add the line:

handle 6 nostop pass

Linking and Libraries

There are two LongBow libraries that must be linked with the application: The primary LongBow library, liblongbow.a and one of the LongBow reporter libraries. The reporter libraries enable the reporting mechanism for Longbow. Currently two reporter libraries have been implemented:

  • liblongbow-plaintext.a which displays output as simple text; and
  • liblongbow-ansiterm.a which displays output as an ANSI colorized output.

For example:

% cc foo.c -llongbow -liblongbow-ansiterm

Both display to standard output.

Running and Runtime Behavior

You can run Longbow in one of two ways: Run your application with assertions turned on in order to test expected invariance during runtime; or run your tests using Longbow's Test Runner.

Turning off assertions for runtime is not currently supported.