diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-02-11 14:03:23 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-02-11 14:03:23 +0000 |
commit | 5382010aeae8b9fa3ce93cd2f1b714eeb2bd31fb (patch) | |
tree | a42a10abaeaf9472749880c2f8d66fa42be318b7 | |
parent | 40f960dab8ec0c4c133727baaa649664ee4953db (diff) | |
download | haskell-5382010aeae8b9fa3ce93cd2f1b714eeb2bd31fb.tar.gz |
Change '{if,unless}_arch' to 'arch'
-rw-r--r-- | testsuite/driver/testlib.py | 13 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_compile/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/ffi/should_run/all.T | 2 |
4 files changed, 6 insertions, 15 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index b9104fc881..02c7ba32b8 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/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/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 046d98ec56..220ff85003 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/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/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 77224a2e15..d470d7b4a3 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/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/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index 09e69447ef..a8d62ff705 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/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, ['']) |