Commit f98194b2 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Merge branch 'master' of http://darcs.haskell.org/testsuite

Conflicts:
	tests/typecheck/should_fail/all.T
parents 584f65a6 125a20ff

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
This diff is collapsed.
......@@ -7,6 +7,7 @@ TOP = .
# being defined.
ifneq "$(MAKECMDGOALS)" "clean"
ifneq "$(MAKECMDGOALS)" "distclean"
ifneq "$(MAKECMDGOALS)" "maintainer-clean"
include $(TOP)/mk/boilerplate.mk
......@@ -18,7 +19,8 @@ all:
endif
endif
endif
clean distclean maintainer-clean:
$(MAKE) -C $(TOP)/timeout $@
$(RM) -f mk/*.o mk/*.hi mk/ghc-config mk/ghc-config.exe mk/ghcconfig*.mk
......@@ -7,7 +7,7 @@ import re
#
config.compiler_type = 'ghc'
config.compiler = 'ghc'
config.compiler_always_flags = ['-fforce-recomp', '-dcore-lint', '-dcmm-lint', '-dno-debug-output', '-no-user-package-conf', '-rtsopts']
config.compiler_always_flags = ghc_compiler_always_flags.split()
config.hp2ps = 'hp2ps'
config.hpc = 'hpc'
......@@ -26,7 +26,7 @@ config.other_ways = ['extcore','optextcore',
'prof_hc_hb','prof_hb',
'prof_hd','prof_hy','prof_hr',
'threaded1_ls', 'threaded2_hT',
'llvm', 'debugllvm']
'llvm', 'debugllvm', 'optllvm']
if (ghc_with_native_codegen == 1):
config.compile_ways.append('optasm')
......@@ -46,6 +46,7 @@ config.unregisterised = (ghc_unregisterised == 1)
if (ghc_with_threaded_rts == 1):
config.run_ways.append('threaded1')
if (ghc_with_smp == 1):
config.have_smp = True
config.run_ways.append('threaded2')
if (ghc_with_dynamic_rts == 1):
......@@ -65,27 +66,27 @@ config.clean_only = clean_only
config.way_flags = {
'normal' : [],
'g1' : [],
'optasm' : ['-O -fasm'],
'optasm' : ['-O', '-fasm'],
'llvm' : ['-fllvm'],
'optllvm' : ['-O -fllvm'],
'debugllvm' : ['-fllvm -keep-llvm-files'],
'prof' : ['-prof -auto-all -fasm'],
'profasm' : ['-O -prof -auto-all'],
'profthreaded' : ['-O -prof -auto-all -threaded'],
'optllvm' : ['-O', '-fllvm'],
'debugllvm' : ['-fllvm', '-keep-llvm-files'],
'prof' : ['-prof', '-auto-all', '-fasm'],
'profasm' : ['-O', '-prof', '-auto-all'],
'profthreaded' : ['-O', '-prof', '-auto-all', '-threaded'],
'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '+RTS', '-I0.1', '-RTS'],
'extcore' : ['-fext-core'],
'optextcore' : ['-O -fext-core'],
'optextcore' : ['-O', '-fext-core'],
'threaded1' : ['-threaded', '-debug'],
'threaded1_ls' : ['-threaded', '-debug'],
'threaded2' : ['-O', '-threaded', '-eventlog'],
'threaded2_hT' : ['-O', '-threaded'],
'hpc' : ['-O', '-fhpc' ],
'prof_hc_hb' : ['-O -prof -auto-all'],
'prof_hb' : ['-O -prof -auto-all'],
'prof_hd' : ['-O -prof -auto-all'],
'prof_hy' : ['-O -prof -auto-all'],
'prof_hr' : ['-O -prof -auto-all'],
'dyn' : ['-O -dynamic']
'prof_hc_hb' : ['-O', '-prof', '-auto-all'],
'prof_hb' : ['-O', '-prof', '-auto-all'],
'prof_hd' : ['-O', '-prof', '-auto-all'],
'prof_hy' : ['-O', '-prof', '-auto-all'],
'prof_hr' : ['-O', '-prof', '-auto-all'],
'dyn' : ['-O', '-dynamic']
}
config.way_rts_flags = {
......@@ -114,13 +115,20 @@ config.way_rts_flags = {
'dyn' : []
}
# Useful classes of ways:
# Useful classes of ways that can be used with only_ways() and
# expect_broken_for().
prof_ways = filter(lambda x: x in config.run_ways,
['prof', 'profasm','profthreaded'])
prof_ways = map (lambda x: x[0], \
filter(lambda x: '-prof' in x[1], \
config.way_flags.items()))
threaded_ways = filter(lambda x: x in config.run_ways,
['threaded1','threaded2','ghci','profthreaded'])
threaded_ways = map (lambda x: x[0], \
filter(lambda x: '-threaded' in x[1] or 'ghci' == x[0], \
config.way_flags.items()))
opt_ways = map (lambda x: x[0], \
filter(lambda x: '-O' in x[1], \
config.way_flags.items()))
def get_compiler_info():
# This should really not go through the shell
......
......@@ -102,6 +102,12 @@ if config.use_threads == 1:
if (maj, min, pat) < (2, 5, 2):
print "Warning: Ignoring request to use threads as python version < 2.5.2"
config.use_threads = 0
# We also need to disable threads for python 2.7.2, because of
# this bug: http://bugs.python.org/issue13817
elif (maj, min, pat) == (2, 7, 2):
print "Warning: Ignoring request to use threads as python version is 2.7.2"
print "See http://bugs.python.org/issue13817 for details."
config.use_threads = 0
if windows:
print "Warning: Ignoring request to use threads as running on Windows"
config.use_threads = 0
......
......@@ -87,6 +87,9 @@ class TestConfig:
# Do we have shared libraries?
self.have_shared_libs = False
# Do we have SMP support?
self.have_smp = False
# Are we testing an in-tree compiler?
self.in_tree_compiler = True
......@@ -123,6 +126,8 @@ class TestRun:
self.expected_passes = {}
self.n_expected_failures = 0
self.expected_failures = {}
self.n_missing_libs = 0
self.missing_libs = {}
self.n_unexpected_passes = 0
self.unexpected_passes = {}
self.n_unexpected_failures = 0
......@@ -174,6 +179,11 @@ class TestOptions:
# compile this test to .hc only
self.compile_to_hc = 0
# We sometimes want to modify the compiler_always_flags, so
# they are copied from config.compiler_always_flags when we
# make a new instance of TestOptions.
self.compiler_always_flags = []
# extra compiler opts for this test
self.extra_hc_opts = ''
......@@ -189,6 +199,18 @@ class TestOptions:
# extra files to clean afterward
self.clean_files = []
# which -t numeric fields do we want to look at, and what bounds must
# they fall within?
# Elements of these lists should be things like
# ('bytes allocated',
# 9300000000,
# 10)
# To allow a 10% deviation from 9300000000.
self.compiler_stats_range_fields = {}
self.stats_range_fields = {}
# TODO: deprecate this in favour of compiler_stats_range_fields
#
# which -t numeric fields do we want to look at, and what bounds must
# they fall within?
# Elements of these lists should be things like
......
......@@ -111,7 +111,7 @@ def _reqlib( opts, lib ):
have_lib[lib] = got_it
if not got_it:
opts.expect = 'fail'
opts.expect = 'missing-lib'
def req_profiling( opts ):
if not config.have_profiling:
......@@ -125,6 +125,10 @@ def req_interp( opts ):
if not config.have_interp:
opts.expect = 'fail'
def req_smp( opts ):
if not config.have_smp:
opts.expect = 'fail'
def expect_broken( bug ):
return lambda opts, b=bug: _expect_broken (opts, b )
......@@ -219,6 +223,14 @@ def _extra_run_opts( opts, v ):
# -----
def extra_hc_opts( val ):
return lambda opts, v=val: _extra_hc_opts(opts, v);