Commit 702aa682 authored by simonmar's avatar simonmar

[project @ 2002-01-28 14:15:02 by simonmar]

More hacks to run the Nofib with GHCi:

    - allow arguments to be given the program: these are now
      set using PROG_ARGS in the Makefile rather than just
      adding to SRC_RUNTEST_OPTS as we did before.

    - pass $(HC_OPTS) to GHCi (after filtering out some
      undesirable stuff).
parent 03043d28
......@@ -37,15 +37,20 @@ endif
ifeq "$(NoFibWithGHCi)" "YES"
STDIN = $(NOFIB_PROG).stdin.tmp
GHCI_HC_OPTS = $(filter-out -l% -Rghc-timing,$(HC_OPTS))
runtests ::
@echo "==nofib== $(NOFIB_PROG): time to compile & run $(NOFIB_PROG) follows..."
@$(RM) $(NOFIB_PROG).stdin.tmp
echo main | cat - $(wildcard $(NOFIB_PROG).stdin) > $(NOFIB_PROG).stdin.tmp
@$(RM) $(STDIN)
@echo ":set args $(PROG_ARGS)" > $(STDIN)
@echo "Main.main" >>$(STDIN)
@echo | cat - $(wildcard $(NOFIB_PROG).stdin) >> $(STDIN)
@$(TIME) $(RUNTEST) $(GHC_INPLACE) --interactive -v0 -Wnot \
-i $(NOFIB_PROG).stdin.tmp \
-i $(STDIN) \
$(addprefix -o1 ,$(wildcard $(NOFIB_PROG).stdout*)) \
$(addprefix -o2 ,$(wildcard $(NOFIB_PROG).stderr*)) \
$(RUNTEST_OPTS) Main
$(RUNTEST_OPTS) $(GHCI_HC_OPTS) Main
@$(RM) $(NOFIB_PROG).stdin.tmp
else
......@@ -58,7 +63,7 @@ size :: $(NOFIB_PROG_WAY)
runtests :: $(NOFIB_PROG_WAY) size
@echo ==nofib== $(NOFIB_PROG): cannot do an automatic check of stdout with the parallel system, sorry
@echo ==nofib== $(NOFIB_PROG): run the following command by hand
@echo ./$< $(RUNTEST_OPTS)
@echo ./$< $(RUNTEST_OPTS) $(PROG_ARGS)
@echo ==nofib== $(NOFIB_PROG): output should be
@cat $(wildcard $(NOFIB_PROG).stdout*)
else
......@@ -74,7 +79,7 @@ runtests :: $(NOFIB_PROG_WAY) size
$(addprefix -i ,$(wildcard $(NOFIB_PROG).stdin)) \
$(addprefix -o1 ,$(wildcard $(NOFIB_PROG).stdout*)) \
$(addprefix -o2 ,$(wildcard $(NOFIB_PROG).stderr*)) \
$(RUNTEST_OPTS)
$(RUNTEST_OPTS) $(PROG_ARGS)
endif
else
......
......@@ -11,17 +11,21 @@ SSUBDIRS = \
# salishan no Haskell code!
ifneq "$(HWL_NOFIB_HACK)" ""
NOT_THESE += awards boyer2 knights power simple
# knights: Sort.lhs:15: Module `PrelNum' does not export `Num(fromInt)'
NOT_THESE += awards boyer2 power simple
# power: exit(1)!!
# simple: mismatched outputs
# HWL: tmp disabled for testing GUM-merged version (20/3/01)
SUBDIRS = $(filter-out $(NOT_THESE), $(SSUBDIRS))
else
SUBDIRS = $(SSUBDIRS)
ifeq "$(NoFibWithGHCi)" "YES"
NOT_THESE = circsim constraints cryptarithm1 cryptaritm2
else
NOT_THESE =
endif
endif
SUBDIRS = $(filter-out $(NOT_THESE), $(SSUBDIRS))
include $(TOP)/mk/target.mk
......@@ -4,7 +4,7 @@ include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += -cpp
# Arguments for test program
SRC_RUNTEST_OPTS += 1993
PROG_ARGS = 1993
include $(TOP)/mk/target.mk
......@@ -4,7 +4,7 @@ include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += -fglasgow-exts -package lang
# Here's the argument value for the test run
SRC_RUNTEST_OPTS += 5000 +RTS -K2m -RTS
PROG_ARGS = 5000
include $(TOP)/mk/target.mk
......@@ -4,7 +4,7 @@ include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += -cpp
# Arguments for the test program
SRC_RUNTEST_OPTS += 8 3
PROG_ARGS = 8 3
include $(TOP)/mk/target.mk
TOP = ../..
include $(TOP)/mk/boilerplate.mk
-include opts.mk
# Arguments for the test program
SRC_RUNTEST_OPTS += 1600
PROG_ARGS = 1600
include $(TOP)/mk/target.mk
TOP = ../..
include $(TOP)/mk/boilerplate.mk
SRC_RUNTEST_OPTS += input-data
PROG_ARGS = input-data
include $(TOP)/mk/target.mk
TOP = ../..
SRC_RUNTEST_OPTS += 100 -o1 spheres.ppm
PROG_ARGS = 100
SRC_RUNTEST_OPTS += -o1 spheres.ppm
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/target.mk
......@@ -2,7 +2,8 @@ TOP = ../..
include $(TOP)/mk/boilerplate.mk
# Arguments to test program
SRC_RUNTEST_OPTS += 27000.1 27000.2 +RTS -K3m -H24m -RTS
SRC_RUNTEST_OPTS += +RTS -K3m -H24m -RTS
PROG_ARGS = 27000.1 27000.2
include $(TOP)/mk/target.mk
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment