aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-03-10 18:14:31 -0800
committerTim Newsome <tim@sifive.com>2016-05-23 12:12:10 -0700
commit3fc2f3d5435f6eddaa0670f5ab3c555508bca5bb (patch)
treec389b41af3f0f71c4701deff513948be7416bedc /Makefile.in
parentb8805d1b1569bc9715fdf9b43a9a62e94a19e609 (diff)
downloadriscv-isa-sim-3fc2f3d5435f6eddaa0670f5ab3c555508bca5bb.zip
riscv-isa-sim-3fc2f3d5435f6eddaa0670f5ab3c555508bca5bb.tar.gz
riscv-isa-sim-3fc2f3d5435f6eddaa0670f5ab3c555508bca5bb.tar.bz2
Add very basic 'make check'.
The existing stuff all assumes you're writing your tests in C++.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index dc9ab04..d6b0496 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -120,6 +120,9 @@ INSTALL_LIB := $(INSTALL) -m 644
INSTALL_EXE := $(INSTALL) -m 555
STOW := @stow@
+# Tests
+bintests =
+
#-------------------------------------------------------------------------
# Include subproject makefile fragments
#-------------------------------------------------------------------------
@@ -329,8 +332,17 @@ deps : $(deps)
# Check
#-------------------------------------------------------------------------
-check : $(test_outs)
- echo; grep -h -e'Unit Tests' -e'FAILED' -e'Segementation' $^ < /dev/null; echo
+bintest_outs = $(bintests:=.out)
+%.out: %
+ $^ < /dev/null > $@ 2>&1
+
+check-cpp : $(test_outs)
+ echo; grep -h -e'Unit Tests' -e'FAILED' -e'Segmentation' $^ < /dev/null; echo
+
+check-bin : $(bintest_outs)
+ tail -n 1 $^ < /dev/null
+
+check : check-cpp check-bin
.PHONY : check