From e7679bd745ddd7362524676465314dfef3257458 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 30 Sep 2021 09:35:37 +0100 Subject: Add back scheduling to the driver --- test/test_all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_all.sh b/test/test_all.sh index f072eba..2d78890 100755 --- a/test/test_all.sh +++ b/test/test_all.sh @@ -31,7 +31,7 @@ for cfile in $test_dir/*.c; do gcc -o $outbase.gcc $cfile >/dev/null 2>&1 $outbase.gcc expected=$? - vericert -drtl -o $outbase.v $cfile >/dev/null 2>&1 + vericert -fschedule -drtl -o $outbase.v $cfile >/dev/null 2>&1 if [[ ! -f $outbase.v ]]; then echo "ERROR" continue -- cgit From ec8936af263a2094dd7c0a8a64668b41b567f9f5 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 1 Oct 2021 23:05:02 +0100 Subject: [test] Fix testing from Makefile --- test/test_all.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/test_all.sh b/test/test_all.sh index 2d78890..f2b045b 100755 --- a/test/test_all.sh +++ b/test/test_all.sh @@ -1,3 +1,5 @@ +#!/bin/bash + mytmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') echo "--------------------------------------------------" echo "Created working directory: $mytmpdir" -- cgit From 0a7eca06548e7261e28ba49679cc2ba4e6851e59 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 8 Oct 2021 23:00:40 +0100 Subject: Fix running of tests using a Makefile --- test/Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 test/Makefile (limited to 'test') diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..f161386 --- /dev/null +++ b/test/Makefile @@ -0,0 +1,34 @@ +CC ?= gcc +VERICERT ?= vericert +VERICERT_OPTS ?= -fschedule +IVERILOG ?= iverilog +IVERILOG_OPTS ?= + +TESTS := $(patsubst %.c,%.check,$(wildcard *.c)) + +all: $(TESTS) + +%.gcc.out: %.gcc + @./$< ; echo "$$?" >$@ + +%.o: %.c + @$(CC) $(CFLAGS) -c $< -o $@ + +%.gcc: %.o + @$(CC) $(CFLAGS) $< -o $@ + +%.v: %.c + @$(VERICERT) $(VERICERT_OPTS) $< -o $@ + +%.iver: %.v + @$(IVERILOG) $(IVERILOG_OPTS) -o $@ -- $< + +%.veri.out: %.iver + @./$< | tail -n1 | sed -r -e 's/[^0-9]*([0-9]+)/\1/' >$@ + +%.check: %.gcc.out %.veri.out + @diff $^ >$@ + @printf "\033[0;36mOK\033[0m\t$(patsubst %.check,%,$@)\n" + +clean: + rm -f *.check *.gcc *.gcc.out *.o *.v *.iver *.veri.out -- cgit From 11c5cc2ce59fe68959fe424fc04d4e947432abcb Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 9 Oct 2021 14:31:14 +0100 Subject: Fix some of the testing in Makefile --- test/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/Makefile b/test/Makefile index f161386..9413c70 100644 --- a/test/Makefile +++ b/test/Makefile @@ -12,13 +12,13 @@ all: $(TESTS) @./$< ; echo "$$?" >$@ %.o: %.c - @$(CC) $(CFLAGS) -c $< -o $@ + @$(CC) $(CFLAGS) -c -o $@ $< %.gcc: %.o - @$(CC) $(CFLAGS) $< -o $@ + @$(CC) $(CFLAGS) -o $@ $< %.v: %.c - @$(VERICERT) $(VERICERT_OPTS) $< -o $@ + @$(VERICERT) $(VERICERT_OPTS) -o $@ $< %.iver: %.v @$(IVERILOG) $(IVERILOG_OPTS) -o $@ -- $< -- cgit