Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,325
Issues
4,325
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
361
Merge Requests
361
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
7d734542
Commit
7d734542
authored
Feb 08, 2013
by
ian@well-typed.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace 'if_platform' and 'unless_platform' with 'platform'
parent
d34f3e85
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
26 deletions
+17
-26
testsuite/driver/testlib.py
testsuite/driver/testlib.py
+2
-11
testsuite/tests/codeGen/should_gen_asm/all.T
testsuite/tests/codeGen/should_gen_asm/all.T
+3
-3
testsuite/tests/ffi/should_run/all.T
testsuite/tests/ffi/should_run/all.T
+1
-1
testsuite/tests/ghci/scripts/all.T
testsuite/tests/ghci/scripts/all.T
+1
-1
testsuite/tests/numeric/should_run/all.T
testsuite/tests/numeric/should_run/all.T
+1
-1
testsuite/tests/perf/compiler/all.T
testsuite/tests/perf/compiler/all.T
+3
-3
testsuite/tests/rts/all.T
testsuite/tests/rts/all.T
+6
-6
No files found.
testsuite/driver/testlib.py
View file @
7d734542
...
...
@@ -312,17 +312,8 @@ def when(b, f):
def
unless
(
b
,
f
):
return
when
(
not
b
,
f
)
def
if_platform
(
plat
,
f
):
if
config
.
platform
==
plat
:
return
f
else
:
return
normal
def
unless_platform
(
plat
,
f
):
if
config
.
platform
!=
plat
:
return
f
else
:
return
normal
def
platform
(
plat
):
return
config
.
platform
==
plat
def
if_os
(
os
,
f
):
if
config
.
os
==
os
:
...
...
testsuite/tests/codeGen/should_gen_asm/all.T
View file @
7d734542
test
('
memcpy
',
unless
_platform
('
x86_64-unknown-linux
'
,
skip
),
compile_cmp_asm
,
[''])
unless
(
platform
('
x86_64-unknown-linux
')
,
skip
),
compile_cmp_asm
,
[''])
test
('
memcpy-unroll
',
unless
_platform
('
x86_64-unknown-linux
'
,
skip
),
compile_cmp_asm
,
[''])
unless
(
platform
('
x86_64-unknown-linux
')
,
skip
),
compile_cmp_asm
,
[''])
test
('
memcpy-unroll-conprop
',
unless
_platform
('
x86_64-unknown-linux
'
,
skip
),
compile_cmp_asm
,
[''])
unless
(
platform
('
x86_64-unknown-linux
')
,
skip
),
compile_cmp_asm
,
[''])
testsuite/tests/ffi/should_run/all.T
View file @
7d734542
...
...
@@ -33,7 +33,7 @@ test('ffi004', skip, compile_and_run, [''])
#
test
('
ffi005
',
[
omit_ways
(
prof_ways
),
if_arch
('
i386
',
skip
),
if_platform
('
i386-apple-darwin
'
,
expect_broken
(
4105
)),
when
(
platform
('
i386-apple-darwin
')
,
expect_broken
(
4105
)),
exit_code
(
3
)
],
compile_and_run
,
[''])
...
...
testsuite/tests/ghci/scripts/all.T
View file @
7d734542
...
...
@@ -38,7 +38,7 @@ test('ghci022', normal, ghci_script, ['ghci022.script'])
test
('
ghci023
',
normal
,
ghci_script
,
['
ghci023.script
'])
test
('
ghci024
',
[
skip_if_fast
,
if_platform
("
powerpc-apple-darwin
"
,
expect_broken
(
1845
))],
when
(
platform
("
powerpc-apple-darwin
")
,
expect_broken
(
1845
))],
run_command
,
['
$MAKE -s --no-print-directory ghci024
'])
test
('
ghci025
',
normal
,
ghci_script
,
['
ghci025.script
'])
...
...
testsuite/tests/numeric/should_run/all.T
View file @
7d734542
...
...
@@ -7,7 +7,7 @@ test('arith001', normal, compile_and_run, [''])
test
('
arith002
',
normal
,
compile_and_run
,
[''])
test
('
arith003
',
normal
,
compile_and_run
,
[''])
test
('
arith004
',
normal
,
compile_and_run
,
[''])
test
('
arith005
',
if_platform
('
i386-apple-darwin
'
,
expect_broken_for
(
7043
,
'
ghci
')),
compile_and_run
,
[''])
test
('
arith005
',
when
(
platform
('
i386-apple-darwin
')
,
expect_broken_for
(
7043
,
'
ghci
')),
compile_and_run
,
[''])
test
('
arith006
',
normal
,
compile_and_run
,
[''])
test
('
arith007
',
normal
,
compile_and_run
,
[''])
...
...
testsuite/tests/perf/compiler/all.T
View file @
7d734542
...
...
@@ -117,7 +117,7 @@ test('T4801',
# 12/11/2012: 49 (amd64/Linux) (REASON UNKNOWN!)
# expected value: 58 (amd64/OS X):
if_platform
('
x86_64-apple-darwin
'
,
when
(
platform
('
x86_64-apple-darwin
')
,
compiler_stats_range_field
('
peak_megabytes_allocated
',
58
,
1
)),
# expected value: 228286660 (x86/OS X)
when
(
wordsize
(
32
),
...
...
@@ -130,7 +130,7 @@ test('T4801',
# 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off)
# expected value: 510938976 (amd64/OS X):
if_platform
('
x86_64-apple-darwin
'
,
when
(
platform
('
x86_64-apple-darwin
')
,
compiler_stats_range_field
('
bytes allocated
',
510938976
,
5
)),
when
(
wordsize
(
32
),
...
...
@@ -144,7 +144,7 @@ test('T4801',
# 19/10/2012: 26882576 (-fPIC turned on)
# 19/10/2012: 18619912 (-fPIC turned off)
# 24/12/2012: 21657520 (perhaps gc sampling time wibbles?)
if_platform
('
x86_64-apple-darwin
'
,
when
(
platform
('
x86_64-apple-darwin
')
,
compiler_stats_range_field
('
max_bytes_used
',
21657520
,
5
)),
only_ways
(['
normal
']),
extra_hc_opts
('
-static
')
...
...
testsuite/tests/rts/all.T
View file @
7d734542
...
...
@@ -9,7 +9,7 @@ test('testblockalloc', compose(c_src,
test
('
bug1010
',
normal
,
compile_and_run
,
['
+RTS -c -RTS
'])
test
('
derefnull
',
composes
([
if_platform
('
x86_64-unknown-mingw32
'
,
expect_broken
(
6079
)),
when
(
platform
('
x86_64-unknown-mingw32
')
,
expect_broken
(
6079
)),
# LLVM Optimiser considers dereference of a null pointer
# undefined and marks the code as unreachable which means
# that later optimisations remove it altogether.
...
...
@@ -21,13 +21,13 @@ test('derefnull',
# the right exit code we're OK.
if_os
('
linux
',
ignore_output
),
# SIGBUS on OX X (PPC and x86 only; amd64 gives SEGV)
if_platform
('
i386-apple-darwin
'
,
exit_code
(
138
)),
if_platform
('
powerpc-apple-darwin
'
,
exit_code
(
138
)),
when
(
platform
('
i386-apple-darwin
')
,
exit_code
(
138
)),
when
(
platform
('
powerpc-apple-darwin
')
,
exit_code
(
138
)),
if_os
('
mingw32
',
exit_code
(
1
))]),
compile_and_run
,
[''])
test
('
divbyzero
',
composes
([
if_platform
('
x86_64-unknown-mingw32
'
,
expect_broken
(
6079
)),
when
(
platform
('
x86_64-unknown-mingw32
')
,
expect_broken
(
6079
)),
# SIGFPE on Linux
exit_code
(
136
),
# Apparently the output can be different on different
...
...
@@ -121,8 +121,8 @@ def config_T5250(name, opts):
test
('
T5250
',
[
config_T5250
,
# stack ptr is not 16-byte aligned on 32-bit Windows
if_platform
('
i386-unknown-mingw32
'
,
expect_fail
),
if_platform
('
i386-unknown-linux
'
,
when
(
platform
('
i386-unknown-mingw32
')
,
expect_fail
),
when
(
platform
('
i386-unknown-linux
')
,
expect_broken_for
(
4211
,['
llvm
'])),
extra_clean
(['
spalign.o
']),
omit_ways
(['
ghci
'])
],
...
...
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