Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
8d34b5c7
Commit
8d34b5c7
authored
Feb 11, 2013
by
ian@well-typed.com
Browse files
Convert more helper functions
parent
7cc907d3
Changes
35
Hide whitespace changes
Inline
Side-by-side
testsuite/driver/testlib.py
View file @
8d34b5c7
...
...
@@ -348,75 +348,36 @@ def have_profiling( ):
# ---
def
if_ghci_dynamic
(
f
):
if
config
.
ghc_dynamic_by_default
:
return
f
else
:
return
normal
def
ghci_dynamic
(
):
return
config
.
ghc_dynamic_by_default
def
if_in_tree_compiler
(
f
):
if
config
.
in_tree_compiler
:
return
f
else
:
return
normal
def
in_tree_compiler
(
):
return
config
.
in_tree_compiler
def
unless_in_tree_compiler
(
f
):
if
config
.
in_tree_compiler
:
return
normal
else
:
return
f
def
compiler_type
(
compiler
):
return
config
.
compiler_type
==
compiler
def
if_compiler_type
(
compiler
,
f
):
if
config
.
compiler_type
==
compiler
:
return
f
else
:
return
normal
def
compiler_profiled
(
):
return
config
.
compiler_profiled
def
if_compiler_profiled
(
f
):
if
config
.
compiler_profiled
:
return
f
else
:
return
normal
def
compiler_lt
(
compiler
,
version
):
return
config
.
compiler_type
==
compiler
and
\
version_lt
(
config
.
compiler_version
,
version
)
def
unless_compiler_profiled
(
f
):
if
config
.
compiler_profiled
:
return
normal
else
:
return
f
def
compiler_le
(
compiler
,
version
):
return
config
.
compiler_type
==
compiler
and
\
version_le
(
config
.
compiler_version
,
version
)
def
if_compiler_lt
(
compiler
,
version
,
f
):
if
config
.
compiler_type
==
compiler
and
\
version_lt
(
config
.
compiler_version
,
version
):
return
f
else
:
return
normal
def
compiler_gt
(
compiler
,
version
):
return
config
.
compiler_type
==
compiler
and
\
version_gt
(
config
.
compiler_version
,
version
)
def
if_compiler_le
(
compiler
,
version
,
f
):
if
config
.
compiler_type
==
compiler
and
\
version_le
(
config
.
compiler_version
,
version
):
return
f
else
:
return
normal
def
compiler_ge
(
compiler
,
version
):
return
config
.
compiler_type
==
compiler
and
\
version_ge
(
config
.
compiler_version
,
version
)
def
if_compiler_gt
(
compiler
,
version
,
f
):
if
config
.
compiler_type
==
compiler
and
\
version_gt
(
config
.
compiler_version
,
version
):
return
f
else
:
return
normal
def
if_compiler_ge
(
compiler
,
version
,
f
):
if
config
.
compiler_type
==
compiler
and
\
version_ge
(
config
.
compiler_version
,
version
):
return
f
else
:
return
normal
def
if_compiler_debugged
(
f
):
if
config
.
compiler_debugged
:
return
f
else
:
return
normal
def
compiler_debugged
(
):
return
config
.
compiler_debugged
def
namebase
(
nb
):
return
lambda
opts
,
nb
=
nb
:
_namebase
(
opts
,
nb
)
...
...
testsuite/tests/annotations/should_compile/all.T
View file @
8d34b5c7
setTestOpts
(
if_
compiler_profiled
(
skip
))
setTestOpts
(
when
(
compiler_profiled
(
),
skip
))
# Annotations, like Template Haskell, require runtime evaluation. In
# order for this to work with profiling, we would have to build the
...
...
testsuite/tests/annotations/should_run/all.T
View file @
8d34b5c7
setTestOpts
(
if_
compiler_profiled
(
skip
))
setTestOpts
(
when
(
compiler_profiled
(
),
skip
))
# These tests are very slow due to their use of package GHC
setTestOpts
(
skip_if_fast
)
...
...
testsuite/tests/arrows/should_fail/all.T
View file @
8d34b5c7
setTestOpts
(
only_compiler_types
(['
ghc
']))
test
('
arrowfail001
',
if_
compiler_debugged
(
expect_broken
(
5267
)),
when
(
compiler_debugged
(
),
expect_broken
(
5267
)),
compile_fail
,
[''])
# arrowfail001 gets an ASSERT error in the stage1 compiler
...
...
testsuite/tests/concurrent/should_run/all.T
View file @
8d34b5c7
...
...
@@ -53,7 +53,7 @@ test('numsparks001', only_ways(['threaded1']), compile_and_run, [''])
test
('
T4262
',
[
skip
,
# skip for now, it doesn't give reliable results
only_ways
(['
threaded1
']),
unless
(
opsys
('
linux
'),
skip
),
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
)
],
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
)
],
compile_and_run
,
[''])
test
('
T4813
',
normal
,
compile_and_run
,
[''])
...
...
testsuite/tests/deSugar/should_compile/all.T
View file @
8d34b5c7
...
...
@@ -76,7 +76,7 @@ test('GadtOverlap', normal, compile, ['-Wall'])
test
('
T2395
',
normal
,
compile
,
[''])
test
('
T4371
',
normal
,
compile
,
[''])
test
('
T4439
',
normal
,
compile
,
[''])
test
('
T4488
',
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
compile
,
[''])
test
('
T4488
',
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
compile
,
[''])
test
('
T4870
',
[
only_ways
(['
optasm
']),
only_compiler_types
(['
ghc
']),
...
...
testsuite/tests/deSugar/should_run/all.T
View file @
8d34b5c7
...
...
@@ -38,5 +38,5 @@ test('mc06', normal, compile_and_run, [''])
test
('
mc07
',
normal
,
compile_and_run
,
[''])
test
('
mc08
',
normal
,
compile_and_run
,
[''])
test
('
T5742
',
normal
,
compile_and_run
,
[''])
test
('
DsLambdaCase
',
if_
compiler_lt
('
ghc
',
'
7.5
',
skip
),
compile_and_run
,
[''])
test
('
DsMultiWayIf
',
if_
compiler_lt
('
ghc
',
'
7.5
',
skip
),
compile_and_run
,
[''])
test
('
DsLambdaCase
',
when
(
compiler_lt
('
ghc
',
'
7.5
'
)
,
skip
),
compile_and_run
,
[''])
test
('
DsMultiWayIf
',
when
(
compiler_lt
('
ghc
',
'
7.5
'
)
,
skip
),
compile_and_run
,
[''])
testsuite/tests/gadt/all.T
View file @
8d34b5c7
...
...
@@ -102,10 +102,10 @@ test('gadt25', normal, compile, [''])
test
('
T3651
',
normal
,
compile_fail
,
[''])
test
('
T3638
',
normal
,
compile
,
[''])
test
('
gadtSyntax001
',
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
compile
,
[''])
test
('
gadtSyntaxFail001
',
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
compile_fail
,
[''])
test
('
gadtSyntaxFail002
',
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
compile_fail
,
[''])
test
('
gadtSyntaxFail003
',
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
compile_fail
,
[''])
test
('
gadtSyntax001
',
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
compile
,
[''])
test
('
gadtSyntaxFail001
',
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
compile_fail
,
[''])
test
('
gadtSyntaxFail002
',
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
compile_fail
,
[''])
test
('
gadtSyntaxFail003
',
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
compile_fail
,
[''])
test
('
T3169
',
normal
,
compile_fail
,
[''])
test
('
T5424
',
extra_clean
(['
T5424a.hi
',
'
T5424a.o
']),
...
...
testsuite/tests/ghc-e/should_run/all.T
View file @
8d34b5c7
setTestOpts
(
if_
compiler_profiled
(
skip
))
setTestOpts
(
when
(
compiler_profiled
(
),
skip
))
test
('
ghc-e001
',
req_interp
,
run_command
,
['
$MAKE --no-print-directory -s ghc-e001
'])
test
('
ghc-e002
',
req_interp
,
run_command
,
['
$MAKE --no-print-directory -s ghc-e002
'])
...
...
@@ -8,7 +8,7 @@ test('ghc-e004', req_interp, run_command, ['$MAKE --no-print-directory -s ghc-e0
test
('
ghc-e005
',
req_interp
,
run_command
,
['
$MAKE --no-print-directory -s ghc-e005
'])
test
('
T2228
',
[
req_interp
,
if_
ghci_dynamic
(
expect_broken
(
7298
))],
[
req_interp
,
when
(
ghci_dynamic
(
),
expect_broken
(
7298
))],
run_command
,
['
$MAKE --no-print-directory -s T2228
'])
test
('
T2636
',
req_interp
,
run_command
,
['
$MAKE --no-print-directory -s T2636
'])
...
...
testsuite/tests/ghci.debugger/scripts/all.T
View file @
8d34b5c7
setTestOpts
(
composes
([
extra_run_opts
('
-ignore-dot-ghci
'),
if_
compiler_profiled
(
skip
),
when
(
compiler_profiled
(
),
skip
),
normalise_slashes
]))
test
('
print001
',
normal
,
ghci_script
,
['
print001.script
'])
...
...
@@ -36,7 +36,7 @@ test('print032', normal, ghci_script, ['print032.script'])
test
('
print033
',
normal
,
ghci_script
,
['
print033.script
'])
test
('
print034
',
normal
,
ghci_script
,
['
print034.script
'])
test
('
print035
',
if_
ghci_dynamic
(
expect_broken
(
7326
)),
when
(
ghci_dynamic
(
),
expect_broken
(
7326
)),
ghci_script
,
['
print035.script
'])
...
...
testsuite/tests/ghci.debugger/scripts/break022/all.T
View file @
8d34b5c7
setTestOpts
(
extra_run_opts
('
-ignore-dot-ghci
'))
setTestOpts
(
if_
compiler_profiled
(
skip
))
setTestOpts
(
when
(
compiler_profiled
(
),
skip
))
test
('
break022
',
extra_clean
(['
A.hs
']),
ghci_script
,
['
break022.script
'])
testsuite/tests/ghci.debugger/scripts/break023/all.T
View file @
8d34b5c7
setTestOpts
(
extra_run_opts
('
-ignore-dot-ghci
'))
setTestOpts
(
if_
compiler_profiled
(
skip
))
setTestOpts
(
when
(
compiler_profiled
(
),
skip
))
test
('
break023
',
extra_clean
(['
A.hs
']),
ghci_script
,
['
break023.script
'])
testsuite/tests/ghci/linking/all.T
View file @
8d34b5c7
test
('
ghcilink001
',
[
if_
ghci_dynamic
(
expect_fail
),
# dynamic ghci can't load '.a's
[
when
(
ghci_dynamic
(
),
expect_fail
),
# dynamic ghci can't load '.a's
skip_if_no_ghci
,
extra_clean
(['
dir001/*
','
dir001
'])],
run_command
,
...
...
@@ -21,7 +21,7 @@ test('ghcilink003',
['
$MAKE -s --no-print-directory ghcilink003
'])
test
('
ghcilink004
',
[
if_
ghci_dynamic
(
expect_fail
),
# dynamic ghci can't load '.a's
[
when
(
ghci_dynamic
(
),
expect_fail
),
# dynamic ghci can't load '.a's
skip_if_no_ghci
,
extra_clean
(['
dir004/*
','
dir004
'])],
run_command
,
...
...
testsuite/tests/ghci/scripts/all.T
View file @
8d34b5c7
# coding=utf8
setTestOpts
(
if_
compiler_profiled
(
skip
))
setTestOpts
(
when
(
compiler_profiled
(
),
skip
))
test
('
ghci001
',
combined_output
,
ghci_script
,
['
ghci001.script
'])
test
('
ghci002
',
combined_output
,
ghci_script
,
['
ghci002.script
'])
...
...
testsuite/tests/ghci/should_run/all.T
View file @
8d34b5c7
setTestOpts
(
if_
compiler_profiled
(
skip
))
setTestOpts
(
when
(
compiler_profiled
(
),
skip
))
# We only want to run these tests with GHCi
def
just_ghci
(
name
,
opts
):
...
...
testsuite/tests/indexed-types/should_compile/all.T
View file @
8d34b5c7
...
...
@@ -159,7 +159,7 @@ test('T4484', normal, compile, [''])
test
('
T4492
',
normal
,
compile
,
[''])
test
('
T4494
',
normal
,
compile
,
[''])
test
('
DataFamDeriv
',
normal
,
compile
,
[''])
test
('
T1769
',
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
compile
,
[''])
test
('
T1769
',
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
compile
,
[''])
test
('
T4497
',
normal
,
compile
,
[''])
test
('
T3484
',
normal
,
compile
,
[''])
test
('
T3460
',
normal
,
compile
,
[''])
...
...
testsuite/tests/indexed-types/should_fail/all.T
View file @
8d34b5c7
...
...
@@ -65,7 +65,7 @@ test('T2239', normal, compile_fail, [''])
test
('
T3440
',
normal
,
compile_fail
,
[''])
test
('
T4485
',
normal
,
compile_fail
,
[''])
test
('
T4174
',
normal
,
compile_fail
,
[''])
test
('
DerivUnsatFam
',
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
compile_fail
,
[''])
test
('
DerivUnsatFam
',
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
compile_fail
,
[''])
test
('
T2664
',
normal
,
compile_fail
,
[''])
test
('
T2664a
',
normal
,
compile
,
[''])
test
('
T2544
',
normal
,
compile_fail
,
[''])
...
...
testsuite/tests/layout/all.T
View file @
8d34b5c7
...
...
@@ -39,7 +39,7 @@ test('layout007',
[
req_interp
,
extra_clean
(['
layout007.hi
',
'
layout007.o
']),
only_compiler_types
(['
ghc
']),
if_
compiler_profiled
(
skip
)],
when
(
compiler_profiled
(
),
skip
)],
run_command
,
['
$MAKE -s --no-print-directory layout007
'])
...
...
testsuite/tests/module/all.T
View file @
8d34b5c7
...
...
@@ -251,7 +251,7 @@ test('mod150', normal, compile_fail, [''])
test
('
mod151
',
normal
,
compile_fail
,
[''])
test
('
mod152
',
normal
,
compile_fail
,
[''])
test
('
mod153
',
normal
,
compile_fail
,
[''])
test
('
mod154
',
if_
compiler_type
('
hugs
',
expect_fail
),
compile
,
[''])
test
('
mod154
',
when
(
compiler_type
('
hugs
'
)
,
expect_fail
),
compile
,
[''])
test
('
mod155
',
normal
,
compile_fail
,
[''])
test
('
mod156
',
normal
,
compile
,
[''])
test
('
mod157
',
...
...
testsuite/tests/module/base01/all.T
View file @
8d34b5c7
setTestOpts
(
only_compiler_types
(['
ghc
']))
test
('
base01
',
[
if_
compiler_lt
('
ghc
',
'
7.1
',
expect_fail
),
[
when
(
compiler_lt
('
ghc
',
'
7.1
'
)
,
expect_fail
),
normalise_slashes
,
clean_cmd
('
$MAKE -s clean
')],
run_command
,
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
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