Skip to content

Run ctest inside gdb with fixtures and environment

License

Notifications You must be signed in to change notification settings

syyyr/gdb-ctest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

gdb-ctest

gdb-ctest - run ctest inside gdb, including fixtures and environment

Dependencies

  • ctest
  • gdb
  • jq

Installation

Usage

gdb-ctest <test_name>

Options

<test_name>  Test to be ran. The same for 'ctest -R <test_name>'. Specifying more than one test is an error.
-h,--help    Shows help."
-X           Other arguments starting with a single dash are ignored.
--XXX        Other arguments starting with a double dash are ignored.

Information/caveats

  • Run this in the same directory where you would run ctest.
  • The script supports the ENVIRONMENT property.
  • The test must have at most one FIXTURES_REQUIRED.
  • The fixture must have at most one FIXTURES_SETUP and at most one FIXTURES_CLEANUP.
  • That means that you can run tests that have ENVIRONMENT, but no fixtures.
  • The script shows exactly what commands will it run for the setup, cleanup, and for the actual test command. It will prompt you for confirmation before it runs anything.
  • You can use run inside gdb repeatedly, if your test doesn't depend on redoing fixtures on every run.

About

Run ctest inside gdb with fixtures and environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages