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

tests: fix tests in travis-ci.org #336

Merged
merged 7 commits into from Jul 14, 2017
Merged

tests: fix tests in travis-ci.org #336

merged 7 commits into from Jul 14, 2017

Commits on Jul 11, 2017

  1. tests: add set -e specifier to bail early on build run

    Seems that test1 is failing, but travis is not catching it.
    Likely, this is because the `cppcheck` returns success
    and we need to bail on the `make check` step.
    
    Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
    commodo committed Jul 11, 2017
    Copy the full SHA
    ba8625a View commit details
    Browse the repository at this point in the history
  2. tests: compress test_utile_file with test_basic

    More code compression/de-duplication.
    
    Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
    commodo committed Jul 11, 2017
    Copy the full SHA
    9d47ae8 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2017

  1. travis,tests: run cppcheck only if it exists

    ugh... seems cppcheck is not packaged for OS X
    And `set -e` exposes this.
    
    And also `cppcheck` seems to exit with non-zero
    exit codes by default [even if errs found].
    
    Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
    commodo committed Jul 13, 2017
    Copy the full SHA
    effab3f View commit details
    Browse the repository at this point in the history
  2. tests: fix leak in test_util_file ; found by cppcheck

    Which now seems to fail the build.
    
    Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
    commodo committed Jul 13, 2017
    Copy the full SHA
    7b9432d View commit details
    Browse the repository at this point in the history
  3. configure.ac: check for uselocale function only on Linux platforms

    On Apple this seems to fail the `test_locale` test,
    which would imply that the `uselocale` function
    does not behave as expected.
    
    Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
    commodo committed Jul 13, 2017
    Copy the full SHA
    85f5785 View commit details
    Browse the repository at this point in the history
  4. build: make strerror() override-able

    If we want to override `strerror()` in libjson-c
    to make tests consistent across platforms, we
    need to do it build-wide as configure/build
    option.
    
    Apple linkers make it really hard to override functions
    at link-time, and this seems to be locked down on travis-ci.org
    [ for security reasons I assume ].
    While I got it to work locally, it did not work
    when running on travis.
    
    Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
    commodo committed Jul 13, 2017
    Copy the full SHA
    fb72160 View commit details
    Browse the repository at this point in the history
  5. build,travis: enable strerror override option in build

    To get consistent output between Linux & OS X.
    
    Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
    commodo committed Jul 13, 2017
    Copy the full SHA
    bc2e304 View commit details
    Browse the repository at this point in the history