scc

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

commit d6e81805c12bf44489eacd53d112c0382f1bc52b
parent 66b39b58b8cda3e3c3a86c23401cad0e670a3432
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri,  1 Jul 2022 19:22:31 +0200

tests: Make easier to execute the full set of tests

There are some tests that require external tools installed
and it makes imposible to execute the tests in normal
systems without these custom tools. As a first step we can
skip the tests that are failing.

Diffstat:
Mtests/as/execute/test.sh | 2+-
Mtests/ld/execute/Makefile | 9++++++++-
Mtests/nm/execute/Makefile | 9+++++++--
Mtests/size/execute/Makefile | 9+++++++--
Mtests/strip/execute/Makefile | 9+++++++--
5 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/tests/as/execute/test.sh b/tests/as/execute/test.sh @@ -25,7 +25,7 @@ sed -n '/^\#/ ! { nl -b a > $tmp1 -objdump | +scc-objdump | sed -n '/^data:/,$ { /^data:/ ! { s%.*:%% diff --git a/tests/ld/execute/Makefile b/tests/ld/execute/Makefile @@ -7,7 +7,14 @@ SZ = ../../../bin/scc-size OBJS = f1.o f2.o OBJLIB = f3.o -all test: a.out +all: + @if $(AS) /dev/null 2>/dev/null;\ + then\ + $(MAKE) test;\ + fi + + +tests: a.out a.out: $(OBJS) f.a $(LD) $(OBJS) f.a diff --git a/tests/nm/execute/Makefile b/tests/nm/execute/Makefile @@ -3,14 +3,19 @@ ROOT=../../.. OUT = z80.out +AS = z80-unknown-coff-as -all: tests +all: + @if $(AS) 2>/dev/null;\ + then\ + $(MAKE) tests;\ + fi tests: $(OUT) @PATH=$(ROOT)/bin:$$PATH:. chktest.sh z80.out: master.s - z80-unknown-coff-as -o $@ master.s + $(AS) -o $@ master.s clean: rm -f *.a *.out test.log diff --git a/tests/size/execute/Makefile b/tests/size/execute/Makefile @@ -2,12 +2,17 @@ ROOT=../../.. +AS = z80-unknown-coff-as OUT = z80.out -all: tests +all: + @if $(AS) /dev/null 2>/dev/null;\ + then\ + $(MAKE) tests;\ + fi tests: $(OUT) - @PATH=$(ROOT)/bin:$$PATH:. chktest.sh + @PATH=$(ROOT)/bin:$$PATH:. chktest.sh;\ z80.out: master.s z80-unknown-coff-as -o $@ master.s diff --git a/tests/strip/execute/Makefile b/tests/strip/execute/Makefile @@ -3,14 +3,19 @@ ROOT=../../.. OUT = z80.out +AS = z80-unknown-coff-as -all: tests +all: + @if $(AS) 2>/dev/null;\ + then\ + $(MAKE) tests;\ + fi tests: $(OUT) @PATH=$(ROOT)/bin:$$PATH:. chktest.sh z80.out: master.s - z80-unknown-coff-as -o $@ master.s + $(AS) -o $@ master.s clean: rm -f *.a *.out test.log