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

Draft: Refactor testsuite #70

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Draft: Refactor testsuite #70

wants to merge 6 commits into from

Commits on Oct 8, 2024

  1. Fix native check in testsuite

    commit 459d202 (prefix special defines with FORTIFY_) changed
    define. Adjust the testsuite accordingly.
    ncopa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    d03a9d4 View commit details
    Browse the repository at this point in the history
  2. Don't hardcode gcc path in testsuite makefile

    Use `gcc` as default and pass the CC compiler with the github workflow
    instead.
    ncopa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    b7a5358 View commit details
    Browse the repository at this point in the history
  3. Build testdir binaries in subdirectory

    This makes it possible to do multiple runs without needing to clean in
    between.
    ncopa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    849de95 View commit details
    Browse the repository at this point in the history
  4. Add FORTIFY_CFLAGS to testsuite

    This allows us to disable warnings on Alpine Linux by doing:
    
       make -C tests FORTIFY_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
    
    It also makes it possible to run the tests with -D_FORTIFY_SOURCE=2
    without modifying the Makefile.
    ncopa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    9a8cbb1 View commit details
    Browse the repository at this point in the history
  5. Move system/arch dependent includes to env var SYS_INCLUDES

    Set the system depended includes in github workflows, where we also
    define the syste (ubuntu, x86_64 etc).
    
    This makes it easier to run test suite on Alpine
    ncopa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    b0809da View commit details
    Browse the repository at this point in the history
  6. Refactor testsuite

    - include a `config.mk` if it exists. This is useful to set local cflags
      while debugging. For example:
        echo "CFLAGS+=-U_FORTIFY_SOURCE" > config.mk
    - Remove 'gcc' and 'clang' targets. Let user set that via CC.
    - Add a `check` target, so user can run the test suite with
      `make check`.
    - set -nostdinc always to avoid pull in system headers
    ncopa committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    91576a3 View commit details
    Browse the repository at this point in the history