Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #251: cgreen-runner handle non-lib files #255

Merged
merged 22 commits into from
Dec 28, 2021

Commits on May 30, 2021

  1. Fix cgreen-devs#251: cgreen-runner handle non-lib files

    Remove dependency to nm and rather use libbfd, which is the same lib
    used by nm. There is no additional depency, but cmake will fail if it
    cannot find libbfd. There was no check for nm before.
    
    Unit test still use nm to count the number of symbols. It provides a
    double check on this implementation.
    
    Before we would get:
    $ ./build/tools/cgreen-runner ./build/tests/libbreadcrumb_tests.so
    Running "libbreadcrumb_tests" (9 tests)...
      "Breadcrumb": 9 passes in 3ms.
    Completed "libbreadcrumb_tests": 9 passes in 3ms.
    
    $ ./build/tools/cgreen-runner ./build/tests/Makefile
    /usr/bin/nm: ./build/tests/Makefile: file format not recognized
    No tests found in './build/tests/Makefile'.
    
    $ ./build/tools/cgreen-runner /usr/lib/libgit2.so
    /usr/bin/nm: /usr/lib/libgit2.so: no symbols
    No tests found in '/usr/lib/libgit2.so'.
    
    After this patch we get:
    $ ./build/tools/cgreen-runner ./build/tests/libbreadcrumb_tests.so
    Running "libbreadcrumb_tests" (9 tests)...
      "Breadcrumb": 9 passes in 3ms.
    Completed "libbreadcrumb_tests": 9 passes in 3ms.
    
    $ ./build/tools/cgreen-runner ./build/tests/Makefile
    No tests found in './build/tests/Makefile'.
    
    $ ./build/tools/cgreen-runner /usr/lib/libgit2.so
    No tests found in '/usr/lib/libgit2.so'.
    fnadeau committed May 30, 2021
    Configuration menu
    Copy the full SHA
    8692d76 View commit details
    Browse the repository at this point in the history
  2. Add travis dependency

    Add depending on the distro used: /usr/lib/libbfd.(a|so). Headers and
    libraries are provided by different package depending on the distro:
    binutils, binutils-devel, sys-libs/binutils-libs, etc.
    fnadeau committed May 30, 2021
    Configuration menu
    Copy the full SHA
    afb00f4 View commit details
    Browse the repository at this point in the history
  3. Adapt discoverer unit test

    Following change to dicoverer.c, unit tests needed some rewriting.
    Discoverer acceptance and unit tests were added to cmake.
    fnadeau committed May 30, 2021
    Configuration menu
    Copy the full SHA
    ec2d46c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    956dc6f View commit details
    Browse the repository at this point in the history
  5. Valgrind test are now part of cmake/ctest

    This change allow dependency validation and parallel testing.
    fnadeau committed May 30, 2021
    Configuration menu
    Copy the full SHA
    2d7e2b8 View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2021

  1. Configuration menu
    Copy the full SHA
    1eb64d1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    411658b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0203062 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    00e1004 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    586cd00 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f3ae074 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7945aea View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3aa379e View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2021

  1. Configuration menu
    Copy the full SHA
    aac095e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3742c88 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9767e2f View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2021

  1. [tools][unittests] Re-imagine to avoid using the runner for unittesti…

    …ng runner...
    
    When developing the cgreen-runner, we want to avoid using it for
    running the unittests as to not end up with unit tests not running.
    thoni56 committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    968a6b3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    92fbd8c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d078e83 View commit details
    Browse the repository at this point in the history
  4. [tools][bfd] Add non-dynamic versions of symtab_upper_bounds & canoni…

    …calize
    
    When reading a non-dynamic BFD object we need to use corresponding
    non-dynamic version of the functions. This made the runner correctly
    handle COFF/PE32+ files (.DLL's)
    thoni56 committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    326c5a5 View commit details
    Browse the repository at this point in the history
  5. [tools][runner] Re-merge dynamic and non-dynamic symbol reading

    The difference is actually only which 'symtab_upper_bound' and
    'canonicalize' you use.
    thoni56 committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    12d3699 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    873c5c9 View commit details
    Browse the repository at this point in the history