fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit a9abb9fa5b9124174e9a7ddeec95c8323f4b16af
parent 0f19089c58fb940791659e1c4b4e98795240df4e
Author: jvoisin <julien.voisin@dustri.org>
Date:   Sun, 20 Aug 2023 23:37:08 +0200

Split build and run

Both in the CI, and in the Makefile

Diffstat:
M.github/workflows/coverage.yaml | 2+-
M.github/workflows/testsuite.yaml | 10++++++++--
Mtests/Makefile | 10++++------
3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml @@ -39,7 +39,7 @@ jobs: - name: Installing lcov run: sudo apt install lcov - name: Running the testsuite - run: make -C tests clean coverage + run: make -C tests clean coverage run - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact diff --git a/.github/workflows/testsuite.yaml b/.github/workflows/testsuite.yaml @@ -30,9 +30,12 @@ jobs: run: | sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} 100 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} 100 + - name: Build + shell: bash + run: make -C tests gcc - name: Running the testsuite shell: bash - run: make -C tests gcc | grep -zqv FAIL + run: make -C tests run | grep -zqv FAIL clang: runs-on: ubuntu-latest @@ -58,6 +61,9 @@ jobs: run: | sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.version }} 100 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ matrix.version }} 100 + - name: Build + shell: bash + run: make -C tests clang - name: Running the testsuite shell: bash - run: make -C tests clang | grep -zqv FAIL + run: make -C tests run | grep -zqv FAIL diff --git a/tests/Makefile b/tests/Makefile @@ -96,8 +96,7 @@ TARGETS= \ .SILENT: gcc: CC=../x86_64-linux-musl-native/bin/gcc -gcc: GCOV=../x86_64-linux-musl-native/bin/gcov -gcc: clean all +gcc: $(TARGETS) clang: CC=clang clang: GCOV=gcov @@ -105,15 +104,14 @@ clang: CFLAGS+=-I/usr/include/x86_64-linux-musl clang: CFLAGS+=-I../x86_64-linux-musl-native/include/ clang: CFLAGS+=-Ix86_64-linux-musl-native/include/ clang: CFLAGS+=-nostdinc -clang: clean all +clang: $(TARGETS) - -all: $(TARGETS) run +all: gcc coverage: CFLAGS += -fprofile-arcs -ftest-coverage coverage: CC=../x86_64-linux-musl-native/bin/gcc coverage: GCOV=../x86_64-linux-musl-native/bin/gcov -coverage: all +coverage: $(TARGETS) run $(GCOV) *.c lcov --capture --directory . --output-file coverage.info genhtml coverage.info --output-directory coverage