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

Conversation

ncopa
Copy link
Contributor

@ncopa ncopa commented Oct 3, 2024

Refactor testsuite so the platform dependant (C compiler) and header loactions are more together.

Don't make assumptions on CC or platform to make it easier to run testsuite natively on Alpine, on any architecture.

fixes #69

@ncopa
Copy link
Contributor Author

ncopa commented Oct 3, 2024

we should also add -std=c99 and others to the test matrix.

@ncopa ncopa changed the title Refactor testsuite Draft: Refactor testsuite Oct 4, 2024
ncopa added 6 commits October 8, 2024 15:24
commit 459d202 (prefix special defines with FORTIFY_) changed
define. Adjust the testsuite accordingly.
Use `gcc` as default and pass the CC compiler with the github workflow
instead.
This makes it possible to do multiple runs without needing to clean in
between.
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.
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
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

testsuite fails on Alpine Linux
1 participant