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
Alex D
GHC
Commits
240da006
Commit
240da006
authored
Feb 11, 2013
by
ian@well-typed.com
Browse files
Replace 'if_os' and 'unless_os' with 'opsys'
The name 'os' clashes with a python library
parent
3d94d01a
Changes
8
Hide whitespace changes
Inline
Side-by-side
testsuite/driver/testlib.py
View file @
240da006
...
...
@@ -313,17 +313,8 @@ def unless(b, f):
def
platform
(
plat
):
return
config
.
platform
==
plat
def
if_os
(
os
,
f
):
if
config
.
os
==
os
:
return
f
else
:
return
normal
def
unless_os
(
os
,
f
):
if
config
.
os
==
os
:
return
normal
else
:
return
f
def
opsys
(
os
):
return
config
.
os
==
os
def
if_arch
(
arch
,
f
):
if
config
.
arch
==
arch
:
...
...
testsuite/tests/concurrent/should_run/all.T
View file @
240da006
...
...
@@ -52,7 +52,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
_o
s
('
linux
',
skip
),
unless
(
opsy
s
('
linux
'
)
,
skip
),
if_compiler_lt
('
ghc
',
'
7.1
',
expect_fail
)
],
compile_and_run
,
[''])
...
...
@@ -171,7 +171,7 @@ test('conc036', skip, compile_and_run, [''])
# Interrupting foreign calls only makes sense if we are threaded
test
('
foreignInterruptible
',
[
skip_if_fast
,
if_o
s
('
mingw32
',
expect_fail
),
when
(
opsy
s
('
mingw32
'
)
,
expect_fail
),
# I don't think we support interrupting Sleep()
# on Windows. --SDM
only_threaded_ways
,
...
...
testsuite/tests/driver/dynamicToo/all.T
View file @
240da006
...
...
@@ -6,7 +6,7 @@ test('dynamicToo001',
'
A001.dyn_o
',
'
B001.dyn_o
',
'
C001.dyn_o
',
'
A001.dyn_hi
',
'
B001.dyn_hi
',
'
C001.dyn_hi
',
'
s001
',
'
d001
']),
if_o
s
('
mingw32
',
expect_broken
(
7665
)),
when
(
opsy
s
('
mingw32
'
)
,
expect_broken
(
7665
)),
unless_have_vanilla
(
skip
),
unless_have_dynamic
(
skip
)],
run_command
,
...
...
testsuite/tests/dynlibs/all.T
View file @
240da006
...
...
@@ -7,7 +7,7 @@ test('T3807',
'
T3807-export.o
',
'
T3807-load.o
',
'
T3807test.so
',
'
T3807-load
']),
if_o
s
('
mingw32
',
skip
)],
when
(
opsy
s
('
mingw32
'
)
,
skip
)],
run_command
,
['
$MAKE --no-print-directory -s T3807
'])
...
...
@@ -16,7 +16,7 @@ test('T4464',
extra_clean
(['
T4464B.o
',
'
T4464C.o
',
'
T4464H.hi
',
'
T4464H.o
',
'
T4464H_stub.c
',
'
T4464H_stub.h
',
'
T4464H_stub.o
',
'
HS4464.dll
',
'
HS4464.dll.a
',
'
t4464.exe
']),
unless
_o
s
('
mingw32
',
skip
)],
unless
(
opsy
s
('
mingw32
'
)
,
skip
)],
run_command
,
['
$MAKE --no-print-directory -s T4464
'])
...
...
testsuite/tests/ghc-api/dynCompileExpr/all.T
View file @
240da006
test
('
dynCompileExpr
',
[
extra_run_opts
('
"
'
+
config
.
libdir
+
'
"
'),
if_o
s
('
mingw32
',
expect_broken_for
(
5987
,
['
dyn
'])),
when
(
opsy
s
('
mingw32
'
)
,
expect_broken_for
(
5987
,
['
dyn
'])),
omit_ways
(
prof_ways
)
],
# cannot run interpreted code with -prof
compile_and_run
,
['
-package ghc
'])
testsuite/tests/ghci/linking/all.T
View file @
240da006
...
...
@@ -12,8 +12,8 @@ test('ghcilink002',
test
('
ghcilink003
',
[
if_os
('
mingw32
',
expect_broken
(
5289
)),
# still cannot load libstdc++
# on Windows. See also #4468.
# still cannot load libstdc++
on Windows. See also #4468.
when
(
opsys
('
mingw32
'),
expect_broken
(
5289
)),
skip_if_no_ghci
,
extra_clean
(['
dir003/*
','
dir003
'])
],
...
...
@@ -34,8 +34,8 @@ test('ghcilink005',
test
('
ghcilink006
',
[
if_os
('
mingw32
',
expect_broken
(
5289
)),
# still cannot load libstdc++
# on Windows. See also #4468.
# still cannot load libstdc++
on Windows. See also #4468.
when
(
opsys
('
mingw32
'),
expect_broken
(
5289
)),
skip_if_no_ghci
,
extra_clean
(['
dir006/*
','
dir006
'])
],
...
...
testsuite/tests/ghci/should_run/all.T
View file @
240da006
...
...
@@ -12,7 +12,7 @@ test('T2589', just_ghci, compile_and_run, [''])
test
('
T2881
',
just_ghci
,
compile_and_run
,
[''])
test
('
T3171
',
[
if_o
s
('
mingw32
',
skip
),
[
when
(
opsy
s
('
mingw32
'
)
,
skip
),
req_interp
,
combined_output
],
run_command
,
...
...
testsuite/tests/rts/all.T
View file @
240da006
...
...
@@ -19,11 +19,11 @@ test('derefnull',
# Apparently the output can be different on different
# Linux setups, so just ignore it. As long as we get
# the right exit code we're OK.
if_o
s
('
linux
',
ignore_output
),
when
(
opsy
s
('
linux
'
)
,
ignore_output
),
# SIGBUS on OX X (PPC and x86 only; amd64 gives SEGV)
when
(
platform
('
i386-apple-darwin
'),
exit_code
(
138
)),
when
(
platform
('
powerpc-apple-darwin
'),
exit_code
(
138
)),
if_o
s
('
mingw32
',
exit_code
(
1
))]),
when
(
opsy
s
('
mingw32
'
)
,
exit_code
(
1
))]),
compile_and_run
,
[''])
test
('
divbyzero
',
composes
([
...
...
@@ -33,11 +33,11 @@ test('divbyzero',
# Apparently the output can be different on different
# Linux setups, so just ignore it. As long as we get
# the right exit code we're OK.
if_o
s
('
linux
',
ignore_output
),
if_o
s
('
mingw32
',
exit_code
(
1
))]),
when
(
opsy
s
('
linux
'
)
,
ignore_output
),
when
(
opsy
s
('
mingw32
'
)
,
exit_code
(
1
))]),
compile_and_run
,
[''])
test
('
outofmem
',
if_o
s
('
darwin
',
skip
),
test
('
outofmem
',
when
(
opsy
s
('
darwin
'
)
,
skip
),
run_command
,
['
$MAKE -s --no-print-directory outofmem
'])
test
('
outofmem2
',
extra_run_opts
('
+RTS -M5m -RTS
'),
run_command
,
['
$MAKE -s --no-print-directory outofmem2
'])
...
...
@@ -80,11 +80,11 @@ test('rtsflags002', [ only_ways(['normal']) ], compile_and_run, ['-with-rtsopts=
# Test to see if linker scripts link properly to real ELF files
test
('
T2615
',
[
if_o
s
('
mingw32
',
skip
),
[
when
(
opsy
s
('
mingw32
'
)
,
skip
),
# OS X doesn't seem to support linker scripts
if_o
s
('
darwin
',
skip
),
when
(
opsy
s
('
darwin
'
)
,
skip
),
# Solaris' linker does not support GNUish linker scripts
if_o
s
('
solaris2
',
skip
),
when
(
opsy
s
('
solaris2
'
)
,
skip
),
pre_cmd
('
$MAKE -s --no-print-directory T2615-prep
'),
# Add current directory to dlopen search path
cmd_prefix
('
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
'),
...
...
@@ -105,7 +105,7 @@ test('T4059',
# Test for #4274
test
('
exec_signals
',
[
if_o
s
('
mingw32
',
skip
),
when
(
opsy
s
('
mingw32
'
)
,
skip
),
pre_cmd
('
$MAKE -s --no-print-directory exec_signals-prep
'),
cmd_prefix
('
./exec_signals_prepare
'),
extra_clean
(['
exec_signals_child
',
'
exec_signals_prepare
'])
...
...
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