scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 1ecec676a71682fb62e0f0d9a84f5caac42ab9b7
parent 852498147bf95522e2d95773c2920954a1ef37fa
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 17 Jan 2024 13:45:59 +0100

tests/make: Add tests for -k

Diffstat:
Atests/make/execute/0004-kflag.sh | 30++++++++++++++++++++++++++++++
Mtests/make/execute/test.mk | 5+++++
2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/tests/make/execute/0004-kflag.sh b/tests/make/execute/0004-kflag.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +trap 'rm -f $tmp1 $tmp2' EXIT INT QUIT HUP TERM + +tmp1=tmp1.$$ +tmp2=tmp2.$$ + +cat <<EOF > $tmp2 +sh: 1: no-valid-program: not found +make: warning: target error: error 32512 +Hello World! +make: warning: target follow not remade because of errors +no-valid-program +sh: 1: no-valid-program: not found +make: warning: target error: error 32512 +Hello World! +make: warning: target follow not remade because of errors +-k +no-valid-program +EOF + +(set -e + scc-make -kf test.mk follow + echo fail) > $tmp1 2>&1 + +(set -e + MAKEFLAGS=-k scc-make -f test.mk follow print-makeflags + echo fail) >> $tmp1 2>&1 + +diff $tmp1 $tmp2 diff --git a/tests/make/execute/test.mk b/tests/make/execute/test.mk @@ -1,6 +1,11 @@ .IGNORE: ignored-error +follow: error hello + +hello: + @echo Hello World! + error: no-valid-program