Skip to content

Commit

Permalink
byterun: add to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
askalt committed Oct 15, 2023
1 parent 60fbf12 commit 9547c63
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions regression/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TESTS=$(sort $(basename $(wildcard test*.lama)))

LAMAC=../src/lamac
BYTERUN=../byterun/byterun

.PHONY: check $(TESTS)

Expand All @@ -12,6 +13,10 @@ $(TESTS): %: %.lama
cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log
LAMA=../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log

# Check bytecode intepreter correctness.
$(LAMAC) -b [email protected]
cat [email protected] | $(BYTERUN) -i [email protected] > [email protected] && diff [email protected] orig/[email protected]

clean:
$(RM) test*.log *.s *~ $(TESTS) *.i
$(MAKE) clean -C expressions
Expand Down
3 changes: 3 additions & 0 deletions regression/deep-expressions/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TESTS=$(sort $(basename $(wildcard generated*.lama)))

LAMAC = ../../src/lamac
BYTERUN = ../../byterun/byterun

.PHONY: check $(TESTS)

Expand All @@ -11,6 +12,8 @@ $(TESTS): %: %.lama
@LAMA=../../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(LAMAC) -s $< > $@.log && diff $@.log orig/$@.log
@ $(LAMAC) -b $@.lama
@cat $@.input | $(BYTERUN) -i $@.bc > $@.log && diff $@.log orig/$@.log

clean:
rm -f *.log *.s *~
Expand Down
3 changes: 3 additions & 0 deletions regression/expressions/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TESTS=$(sort $(basename $(wildcard generated*.lama)))

RC = ../../src/lamac
BYTERUN = ../../byterun/byterun

.PHONY: check $(TESTS)

Expand All @@ -11,6 +12,8 @@ $(TESTS): %: %.lama
@LAMA=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
@ $(RC) -b $@.lama
@cat $@.input | $(BYTERUN) -i $@.bc > $@.log && diff $@.log orig/$@.log

clean:
rm -f *.log *.s *~
Expand Down

0 comments on commit 9547c63

Please sign in to comment.