harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1e29024ce991bf53aab1b249f31c31d7eab3a8a2
parent 96f766c0c35c08428a79b75e5945cbcc92d153da
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Fri, 16 Jul 2021 11:37:05 +0000

Add minimal test runtime

Signed-off-by: Eyal Sawady <ecs@d2evs.net>

Diffstat:
Mtests/Makefile | 6++++++
Mtests/configure | 4++--
Atests/rt.ha | 2++
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile @@ -1,4 +1,10 @@ check: @./tests/run +tests/rt.o: tests/rt.ha + @printf 'HARECC\t%s\t$@\n' "tests/rt" + @HARECACHE=\$(HARECACHE) ./harec -o tests/rt.ssa tests/rt.ha + @\$(QBE) -o tests/rt.s tests/rt.ssa + @\$(CC) -c -o tests/rt.o tests/rt.s + .PHONY: check clean-tests diff --git a/tests/configure b/tests/configure @@ -11,11 +11,11 @@ tests() { 904-deref do cat <<EOF -tests/$t: tests/$t.ha +tests/$t: tests/$t.ha tests/rt.o @printf 'HARECC\t%s\t$@\n' "tests/$t" @HARECACHE=\$(HARECACHE) ./harec -o tests/$t.ssa tests/$t.ha @\$(QBE) -o tests/$t.s tests/$t.ssa - @\$(CC) -o tests/$t tests/$t.s + @\$(CC) -o tests/$t tests/$t.s tests/rt.o check: tests/$t diff --git a/tests/rt.ha b/tests/rt.ha @@ -0,0 +1,2 @@ +@symbol("abort") fn c_abort() void; +export @symbol("rt.abort") fn abort_() void = c_abort();