[commit: testsuite] master: Change '{if, unless}_arch' to 'arch' (71d9b69)
Ian Lynagh
igloo at earth.li
Mon Feb 11 17:34:39 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/71d9b698a8045b19f82991d8f2536f1caa166a09
>---------------------------------------------------------------
commit 71d9b698a8045b19f82991d8f2536f1caa166a09
Author: Ian Lynagh <ian at well-typed.com>
Date: Mon Feb 11 14:03:23 2013 +0000
Change '{if,unless}_arch' to 'arch'
>---------------------------------------------------------------
driver/testlib.py | 13 ++-----------
tests/codeGen/should_compile/all.T | 4 ++--
tests/codeGen/should_run/all.T | 2 +-
tests/ffi/should_run/all.T | 2 +-
4 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/driver/testlib.py b/driver/testlib.py
index b9104fc..02c7ba3 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -322,17 +322,8 @@ def platform( plat ):
def opsys( os ):
return config.os == os
-def if_arch( arch, f ):
- if config.arch == arch:
- return f
- else:
- return normal
-
-def unless_arch( arch, f ):
- if config.arch == arch:
- return normal
- else:
- return f
+def arch( arch ):
+ return config.arch == arch
def wordsize( ws ):
return config.wordsize == str(ws)
diff --git a/tests/codeGen/should_compile/all.T b/tests/codeGen/should_compile/all.T
index 046d98e..220ff85 100644
--- a/tests/codeGen/should_compile/all.T
+++ b/tests/codeGen/should_compile/all.T
@@ -15,8 +15,8 @@ test('T3286', extra_clean(['T3286b.o','T3286b.hi']),
test('T3579', normal, compile, [''])
test('T2578', normal, run_command, ['$MAKE -s --no-print-directory T2578'])
# skip llvm on i386 as we don't support fPIC
-test('jmp_tbl', if_arch('i386', omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC -O'])
+test('jmp_tbl', when(arch('i386'), omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC -O'])
test('massive_array',
- [ if_arch('i386', omit_ways(['llvm', 'optllvm'])) ],
+ [ when(arch('i386'), omit_ways(['llvm', 'optllvm'])) ],
compile, ['-fPIC'])
test('T7237', normal, compile, [''])
diff --git a/tests/codeGen/should_run/all.T b/tests/codeGen/should_run/all.T
index 77224a2..d470d7b 100644
--- a/tests/codeGen/should_run/all.T
+++ b/tests/codeGen/should_run/all.T
@@ -87,7 +87,7 @@ test('T5149', omit_ways(['ghci']), multi_compile_and_run,
['T5149', [('T5149_cmm.cmm', '')], ''])
test('T5129', normal, compile_and_run, [''])
test('T5626', exit_code(1), compile_and_run, [''])
-test('T5747', if_arch('i386', extra_hc_opts('-msse2')), compile_and_run, ['-O2'])
+test('T5747', when(arch('i386'), extra_hc_opts('-msse2')), compile_and_run, ['-O2'])
test('T5785', normal, compile_and_run, [''])
test('setByteArray', normal, compile_and_run, [''])
diff --git a/tests/ffi/should_run/all.T b/tests/ffi/should_run/all.T
index 09e6944..a8d62ff 100644
--- a/tests/ffi/should_run/all.T
+++ b/tests/ffi/should_run/all.T
@@ -32,7 +32,7 @@ test('ffi004', skip, compile_and_run, [''])
# use of 80-bit internal precision when using the native code generator.
#
test('ffi005', [ omit_ways(prof_ways),
- if_arch('i386', skip),
+ when(arch('i386'), skip),
when(platform('i386-apple-darwin'), expect_broken(4105)),
exit_code(3) ],
compile_and_run, [''])
More information about the ghc-commits
mailing list