Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
a0f8b238
Commit
a0f8b238
authored
Dec 17, 2008
by
Simon Marlow
Browse files
Make the testsuite work with the new build system
parent
51f05d57
Changes
5
Hide whitespace changes
Inline
Side-by-side
testsuite/mk/boilerplate.mk
View file @
a0f8b238
TESTSUITE_TOP
:=
$(TOP)
TESTSUITE_TOP
:=
$(TOP)
TOP
:=
$(TOP)
/..
TOP
:=
$(TOP)
/..
ifneq
"$(wildcard $(TOP)/ghc.mk)" ""
NEWBUILD
=
YES
else
NEWBUILD
=
NO
endif
ifeq
"$(NEWBUILD)" "YES"
FPTOOLS_TOP
:=
$(TOP)
include
$(FPTOOLS_TOP)/mk/newconfig.mk
default
:
all
else
include
$(TOP)/mk/boilerplate.mk
include
$(TOP)/mk/boilerplate.mk
endif
TOP
:=
$(TESTSUITE_TOP)
TOP
:=
$(TESTSUITE_TOP)
testsuite/mk/target.mk
View file @
a0f8b238
ifeq
"$(NEWBUILD)" "NO"
TOP
:=
$(TOP)
/..
TOP
:=
$(TOP)
/..
include
$(TOP)/mk/target.mk
include
$(TOP)/mk/target.mk
TOP
:=
$(TESTSUITE_TOP)
TOP
:=
$(TESTSUITE_TOP)
endif
testsuite/mk/test.mk
View file @
a0f8b238
...
@@ -38,14 +38,22 @@ COMPILER = ghc
...
@@ -38,14 +38,22 @@ COMPILER = ghc
CONFIGDIR
=
$(TOP)
/config
CONFIGDIR
=
$(TOP)
/config
CONFIG
=
$(CONFIGDIR)
/
$(COMPILER)
CONFIG
=
$(CONFIGDIR)
/
$(COMPILER)
ifeq
"$(NEWBUILD)" "YES"
# can be overriden from the command line
# can be overriden from the command line
ifneq
"$(stage)" ""
ifneq
"$(stage)" ""
TEST_HC
=
$
(
GHC_STAGE
$(stage)
_ABS
)
else
TEST_HC
=
$(GHC_STAGE2_ABS)
endif
GHC_PKG
=
$(FPTOOLS_TOP_ABS)
/
$(GHC_PKG_INPLACE)
else
ifneq
"$(stage)" ""
TEST_HC
=
$
(
GHC_STAGE
$(stage)
)
TEST_HC
=
$
(
GHC_STAGE
$(stage)
)
else
else
TEST_HC
=
$(GHC_STAGE2)
TEST_HC
=
$(GHC_STAGE2)
endif
endif
GHC_PKG
=
$(GHC_PKG_INPLACE)
GHC_PKG
=
$(GHC_PKG_INPLACE)
endif
RUNTEST_OPTS
=
RUNTEST_OPTS
=
...
@@ -130,9 +138,23 @@ WAY =
...
@@ -130,9 +138,23 @@ WAY =
all
::
test
all
::
test
TIMEOUT_PROGRAM
=
$(TOP)
/timeout/install-inplace/bin/timeout
$(exeext)
ifeq
"$(NEWBUILD)" "YES"
timeout
:
$(TIMEOUT_PROGRAM)
TIMEOUT_PROGRAM
=
$(FPTOOLS_TOP)
/inplace/bin/timeout
$(exeext)
$(TIMEOUT_PROGRAM)
:
@
echo
"Looks like you don't have timeout, building it first..."
cd
$(FPTOOLS_TOP)
&&
$(MAKE)
$(MFLAGS)
inplace/bin/timeout
$(exeext)
pwd
:
$(FPTOOLS_TOP)/utils/pwd$(exeext)
$(FPTOOLS_TOP)/utils/pwd$(exeext)
:
@
echo
"Looks like you don't have pwd, building utils first..."
cd
$(FPTOOLS_TOP)
&&
$(MAKE)
$(MFLAGS)
utils/pwd
$(exeext)
else
TIMEOUT_PROGRAM
=
$(TOP)
/timeout/install-inplace/bin/timeout
$(exeext)
$(TIMEOUT_PROGRAM)
:
$(TIMEOUT_PROGRAM)
:
@
echo
"Looks like you don't have timeout, building it first..."
@
echo
"Looks like you don't have timeout, building it first..."
...
@@ -140,11 +162,12 @@ $(TIMEOUT_PROGRAM) :
...
@@ -140,11 +162,12 @@ $(TIMEOUT_PROGRAM) :
pwd
:
$(TOP)/utils/pwd$(exeext)
pwd
:
$(TOP)/utils/pwd$(exeext)
$(TOP)/utils/pwd$(exeext)
:
-
$(TOP)/utils/pwd$(exeext)
:
@
echo
"Looks like you don't have pwd, building utils first..."
@
echo
"Looks like you don't have pwd, building utils first..."
cd
$(TOP)
/utils
&&
$(MAKE)
$(MFLAGS)
all
cd
$(TOP)
/utils
&&
$(MAKE)
$(MFLAGS)
all
endif
test
:
timeout
pwd
test
:
$(TIMEOUT_PROGRAM)
pwd
$(PYTHON)
$(RUNTESTS)
$(RUNTEST_OPTS)
\
$(PYTHON)
$(RUNTESTS)
$(RUNTEST_OPTS)
\
$(
patsubst
%,
--only
=
%,
$(TEST)
)
\
$(
patsubst
%,
--only
=
%,
$(TEST)
)
\
$(
patsubst
%,
--only
=
%,
$(TESTS)
)
\
$(
patsubst
%,
--only
=
%,
$(TESTS)
)
\
...
@@ -160,4 +183,3 @@ accept:
...
@@ -160,4 +183,3 @@ accept:
fast
:
fast
:
$(MAKE)
fast
=
YES
$(MAKE)
fast
=
YES
testsuite/tests/ghc-regress/Makefile
View file @
a0f8b238
...
@@ -4,7 +4,12 @@ include $(TOP)/mk/test.mk
...
@@ -4,7 +4,12 @@ include $(TOP)/mk/test.mk
# The libraries that we actually know about. We don't want to test
# The libraries that we actually know about. We don't want to test
# extralibs that are in our tree but which we haven't built.
# extralibs that are in our tree but which we haven't built.
LIBRARIES
:=
$(
shell
$(GHC_PKG_PROG)
list
--simple-output
--names-only
)
ifeq
"$(NEWBUILD)" "YES"
LIBRARIES
:=
$(
shell
$(FPTOOLS_TOP_ABS)
/
$(GHC_PKG_INPLACE)
list
--simple-output
--names-only
)
else
LIBRARIES
:=
$(
shell
$(GHC_PKG)
list
--simple-output
--names-only
)
endif
# Now find the "tests" directories of those libraries, where they exist
# Now find the "tests" directories of those libraries, where they exist
LIBRARY_TEST_PATHS
:=
$(
wildcard
$(
patsubst
%,
$(FPTOOLS_TOP)
/libraries/%/tests,
$(LIBRARIES)
))
LIBRARY_TEST_PATHS
:=
$(
wildcard
$(
patsubst
%,
$(FPTOOLS_TOP)
/libraries/%/tests,
$(LIBRARIES)
))
...
...
testsuite/timeout/ghc.mk
0 → 100644
View file @
a0f8b238
TIMEOUT_PROGRAM
=
$(INPLACE_BIN)
/timeout
$(exeext)
ifeq
"$(findstring thr,$(GhcRTSWays))" ""
$(TIMEOUT_PROGRAM)
:
testsuite/timeout/timeout.py
$(MKDIRHIER)
`
dirname
$@
`
cp
$<
$@
chmod
+x
$@
else
testsuite/
timeout_dist_MODULES
=
Main WinCBindings
testsuite/
timeout_dist_PROG
=
timeout
testsuite/
timeout_dist_DEP_INCLUDE_DIRS
=
$(GHC_INCLUDE_DIR)
testsuite/
timeout_HC_OPTS
=
-threaded
-XCPP
-package
process
ifeq
"$(Windows)" "YES"
testsuite/
timeout_HC_OPTS
+=
-package
Win32
else
testsuite/
timeout_HC_OPTS
+=
-package
unix
endif
# XXX when GHC generates dependencies it uses the module name, not the
# filename, so we get dependencies on Main.o rather than timeout.o.
# If we don't fix this, timeout gets compiled before the libraries.
testsuite/timeout/dist/build/Main.hs
:
testsuite/timeout/timeout.hs $(MKDIRHIER)
@
$(MKDIRHIER)
$(
dir
$@
)
$(CP)
$<
$@
$(eval
$(call
build-prog,testsuite/timeout,dist,1))
endif
all
:
testsuite/timeout/calibrate.out
# depend on $(GHC_STAGE2) so we can be sure all the libs are built
testsuite/timeout/calibrate.out
:
$(GHC_STAGE2)
$(RM)
-f
testsuite/timeout/TimeMe.o testsuite/timeout/TimeMe.hi testsuite/timeout/TimeMe testsuite/timeout/TimeMe.exe
cd
testsuite/timeout
&&
$(PYTHON)
calibrate
"
$(GHC_STAGE1_ABS)
"
>
../../
$@
CLEAN_FILES
+=
testsuite/timeout/calibrate.out
# We use stage 1 to do the calibration, as stage 2 may not exist.
# This isn't necessarily the compiler we'll be running the testsuite
# with, but it's really the performance of the machine that we're
# interested in
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment