Skip to content

Commit

Permalink
"Merged" master in advanced of implementing the new "Good"
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Eisenberg committed May 24, 2013
1 parent d2e05e4 commit 5ce0666
Show file tree
Hide file tree
Showing 1,522 changed files with 8,604 additions and 5,539 deletions.
86 changes: 86 additions & 0 deletions .gitignore
Expand Up @@ -1194,3 +1194,89 @@ tests/rts/T6006
tests/simplCore/should_run/T5915
tests/simplCore/should_run/T5920
tests/simplCore/should_run/T5997

tests/codeGen/should_run/T5900
tests/codeGen/should_run/T7163
tests/codeGen/should_run/T7361
tests/codeGen/should_run/T7600
tests/codeGen/should_run/Word2Float64
tests/concurrent/should_run/367
tests/concurrent/should_run/367_letnoescape
tests/deSugar/should_run/DsLambdaCase
tests/deSugar/should_run/DsMultiWayIf
tests/dph/nbody/dph-nbody-copy-fast
tests/dph/nbody/dph-nbody-copy-opt
tests/driver/T7060dump/
tests/driver/dynamicToo/A001.dyn_hi
tests/driver/dynamicToo/A001.dyn_o
tests/driver/dynamicToo/B001.dyn_hi
tests/driver/dynamicToo/B001.dyn_o
tests/driver/dynamicToo/C001.dyn_hi
tests/driver/dynamicToo/C001.dyn_o
tests/driver/dynamicToo/d001
tests/driver/dynamicToo/s001
tests/driver/objc/objc-hi
tests/driver/objc/objcpp-hi
tests/driver/recomp012/Foo.hs
tests/driver/recomp012/Main
tests/driver/recomp012/Main.hs
tests/driver/recomp012/MyBool.hs
tests/ext-core/T7239.hcr
tests/ffi/should_run/7170
tests/ffi/should_run/T4012
tests/ghc-api/T7478/A
tests/ghc-api/T7478/T7478
tests/lib/integer/IntegerConversionRules.simpl
tests/lib/integer/gcdInteger
tests/mdo/should_fail/mdofail006
tests/mdo/should_run/mdorun004
tests/mdo/should_run/mdorun005
tests/numeric/should_run/T7014
tests/numeric/should_run/T7014.simpl
tests/numeric/should_run/T7233
tests/optasm-log
tests/optllvm-32-log
tests/optllvm-log
tests/parser/should_compile/T7476/Main.imports
tests/parser/should_compile/T7476/T7476
tests/parser/should_run/ParserMultiWayIf
tests/perf/compiler/T5837.comp.stats
tests/perf/should_run/Conversions
tests/perf/should_run/Conversions.stats
tests/perf/should_run/T7257
tests/perf/should_run/T7257.stats
tests/perf/should_run/T7436
tests/perf/should_run/T7436.stats
tests/perf/should_run/T7507
tests/plugins/simple-plugin/pkg.plugins01/
tests/plugins/simple-plugin/pkg.plugins02/
tests/plugins/simple-plugin/pkg.plugins03/
tests/rts/7087
tests/rts/T7037
tests/rts/T7037_main
tests/rts/T7040
tests/rts/T7160
tests/rts/T7227
tests/rts/T7227.stat
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly01/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly02/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly03/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly04/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly05/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly06/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly07/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly08/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly09/
tests/safeHaskell/check/pkg01/pdb.ImpSafeOnly10/
tests/safeHaskell/check/pkg01/pdb.safePkg01/
tests/simplCore/should_compile/T4138.simpl
tests/simplCore/should_run/T7101
tests/th/T5555
tests/th/T7064
tests/th/TH_StringPrimL
tests/typecheck/should_run/T5751
tests/typecheck/should_run/T5913
tests/typecheck/should_run/T6117
tests/typecheck/should_run/T7023
tests/typecheck/should_run/T7126

34 changes: 29 additions & 5 deletions config/ghc
Expand Up @@ -70,6 +70,8 @@ else:
if (ghc_with_dynamic_rts == 1):
config.run_ways.append('dyn')

config.ghc_dynamic = ghc_dynamic

if (ghc_with_profiling == 1 and ghc_with_threaded_rts == 1):
config.run_ways.append('profthreaded')

Expand All @@ -80,7 +82,7 @@ if (ghc_with_llvm == 1):
config.in_tree_compiler = in_tree_compiler
config.clean_only = clean_only

config.way_flags = {
config.way_flags = lambda name : {
'normal' : [],
'g1' : [],
'optasm' : ['-O', '-fasm'],
Expand All @@ -97,7 +99,7 @@ config.way_flags = {
'threaded1_ls' : ['-threaded', '-debug'],
'threaded2' : ['-O', '-threaded', '-eventlog'],
'threaded2_hT' : ['-O', '-threaded'],
'hpc' : ['-O', '-fhpc' ],
'hpc' : ['-O', '-fhpc', '-hpcdir', '.hpc.' + name ],
'prof_hc_hb' : ['-O', '-prof', '-static', '-auto-all'],
'prof_hb' : ['-O', '-prof', '-static', '-auto-all'],
'prof_hd' : ['-O', '-prof', '-static', '-auto-all'],
Expand Down Expand Up @@ -153,15 +155,15 @@ config.way_rts_flags = {

prof_ways = map (lambda x: x[0], \
filter(lambda x: '-prof' in x[1], \
config.way_flags.items()))
config.way_flags('dummy_name').items()))

threaded_ways = map (lambda x: x[0], \
filter(lambda x: '-threaded' in x[1] or 'ghci' == x[0], \
config.way_flags.items()))
config.way_flags('dummy_name').items()))

opt_ways = map (lambda x: x[0], \
filter(lambda x: '-O' in x[1], \
config.way_flags.items()))
config.way_flags('dummy_name').items()))

def get_compiler_info():
# This should really not go through the shell
Expand Down Expand Up @@ -200,3 +202,25 @@ def get_compiler_info():
except:
config.package_conf_cache_file = ''

try:
if compilerInfoDict["GHC Dynamic"] == "YES":
ghcDynamic = True
elif compilerInfoDict["GHC Dynamic"] == "NO":
ghcDynamic = False
else:
raise 'Bad value for "GHC Dynamic"'
except KeyError:
# GHC < 7.7 doesn't have a "GHC Dynamic" field
ghcDynamic = False

if ghcDynamic:
config.ghc_th_way_flags = "-dynamic"
config.ghci_way_flags = "-dynamic"
config.ghc_th_way = "dyn"
config.ghc_plugin_way = "dyn"
else:
config.ghc_th_way_flags = "-static"
config.ghci_way_flags = "-static"
config.ghc_th_way = "normal"
config.ghc_plugin_way = "normal"

50 changes: 31 additions & 19 deletions driver/runtests.py
Expand Up @@ -207,9 +207,6 @@
global testopts_local
testopts_local.x = TestOptions()

global thisdir_testopts
thisdir_testopts = getThisDirTestOpts()

if config.use_threads:
t.lock = threading.Lock()
t.thread_pool = threading.Condition(t.lock)
Expand Down Expand Up @@ -257,24 +254,39 @@
t.n_framework_failures = t.n_framework_failures + 1
traceback.print_exc()

# Now run all the tests
if config.use_threads:
t.running_threads=0
for oneTest in parallelTests:
oneTest()
if config.use_threads:
t.thread_pool.acquire()
while t.running_threads>0:
t.thread_pool.wait()
t.thread_pool.release()
config.use_threads = False
for oneTest in aloneTests:
oneTest()
if config.list_broken:
global brokens
print ''
print 'Broken tests:'
print (' '.join(map (lambda (b, d, n) : '#' + str(b) + '(' + d + '/' + n + ')', brokens)))
print ''

if t.n_framework_failures != 0:
print 'WARNING:', str(t.n_framework_failures), 'framework failures!'
print ''
else:
# Now run all the tests
if config.use_threads:
t.running_threads=0
for oneTest in parallelTests:
if stopping():
break
oneTest()
if config.use_threads:
t.thread_pool.acquire()
while t.running_threads>0:
t.thread_pool.wait()
t.thread_pool.release()
config.use_threads = False
for oneTest in aloneTests:
if stopping():
break
oneTest()

summary(t, sys.stdout)
summary(t, sys.stdout)

if config.output_summary != '':
summary(t, open(config.output_summary, 'w'))
if config.output_summary != '':
summary(t, open(config.output_summary, 'w'))

sys.exit(0)

20 changes: 9 additions & 11 deletions driver/testglobals.py
Expand Up @@ -48,6 +48,8 @@ def __init__(self):
# run the "fast" version of the test suite
self.fast = 0

self.list_broken = False

# Compiler type (ghc, hugs, nhc, etc.)
self.compiler_type = ''

Expand Down Expand Up @@ -214,17 +216,6 @@ def __init__(self):
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
# ('bytes allocated',
# 9300000000,
# 9400000000)
self.compiler_stats_num_fields = {}
self.stats_num_fields = {}

# should we run this test alone, i.e. not run it in parallel with
# any other threads
self.alone = False
Expand All @@ -237,6 +228,9 @@ def __init__(self):
self.objc_src = 0
self.objcpp_src = 0

# Does this test use a .cmm file?
self.cmm_src = 0

# Should we put .hi/.o files in a subdirectory?
self.outputdir = None

Expand Down Expand Up @@ -271,3 +265,7 @@ def __init__(self):
global default_testopts
default_testopts = TestOptions()

# (bug, directory, name) of tests marked broken
global brokens
brokens = []

0 comments on commit 5ce0666

Please sign in to comment.