From 8073b67c96defdbee148b329a8f9bb2447487cfe Mon Sep 17 00:00:00 2001 From: Siu Kwan Lam Date: Wed, 27 Feb 2013 18:28:15 -0600 Subject: [PATCH] Fix test related to AVX instructions. --- llvm/test_llvmpy.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/llvm/test_llvmpy.py b/llvm/test_llvmpy.py index 3656621..509629c 100644 --- a/llvm/test_llvmpy.py +++ b/llvm/test_llvmpy.py @@ -964,9 +964,13 @@ class TestCPUSupport(TestCase): def test_cpu_support6(self): features = [] - mattrs = ','.join(map(lambda s: '-%s' % s, features)) - print('disable mattrs', mattrs) - self._template(mattrs) + from llvm.workaround.avx_support import detect_avx_support + if not detect_avx_support(): + print 'Skipping: no AVX' + else: + mattrs = ','.join(map(lambda s: '-%s' % s, features)) + print('disable mattrs', mattrs) + self._template(mattrs) tests.append(TestCPUSupport)