Skip to content

Commit

Permalink
Merge pull request #166 from kth-step/holmake+test
Browse files Browse the repository at this point in the history
add some selftests to Holmakefile with test action
  • Loading branch information
didriklundberg authored Mar 5, 2024
2 parents 2fb51ce + 6eab9c9 commit 396b261
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/theory/bir-support/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
INCLUDES = $(HOLBADIR)/src/theory/bir

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) selftest.exe
.PHONY: all

selftest.exe: selftest.uo
$(HOLMOSMLC) -o $@ $<

test: selftest.exe
./selftest.exe
.PHONY: test
9 changes: 8 additions & 1 deletion src/theory/bir/Holmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
INCLUDES = $(HOLBADIR)/src/aux

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) selftest.exe
.PHONY: all

selftest.exe: selftest.uo
$(HOLMOSMLC) -o $@ $<

test: selftest.exe
./selftest.exe
.PHONY: test
13 changes: 12 additions & 1 deletion src/tools/lifter/Holmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,16 @@ INCLUDES = $(HOLDIR)/examples/l3-machine-code/common \
$(HOLBADIR)/src/shared \
$(HOLBADIR)/src/theory/tools/lifter

all: $(DEFAULT_TARGETS)
all: $(DEFAULT_TARGETS) selftest_arm.exe selftest_riscv.exe
.PHONY: all

selftest_arm.exe: selftest_arm.uo
$(HOLMOSMLC) -o $@ $<

selftest_riscv.exe: selftest_riscv.uo
$(HOLMOSMLC) -o $@ $<

test: selftest_arm.exe selftest_riscv.exe
./selftest_arm.exe
./selftest_riscv.exe
.PHONY: test
7 changes: 7 additions & 0 deletions src/tools/lifter/selftest_arm.sml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
open HolKernel Parse;
open testutils;

(* FIXME: needed to avoid quse errors *)
open m0_stepLib;

open bir_update_blockTheory;
open bir_inst_liftingTheory;

open bir_inst_liftingLib;
open bir_inst_liftingLibTypes;
open bir_inst_liftingHelpersLib;
Expand Down
4 changes: 4 additions & 0 deletions src/tools/lifter/selftest_riscv.sml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
open HolKernel Parse
open testutils

(* FIXME: needed to avoid quse errors *)
open m0_stepLib;

open bir_inst_liftingLib;
open PPBackEnd
open riscv_assemblerLib;
Expand Down

0 comments on commit 396b261

Please sign in to comment.