Fix test related to AVX instructions.

This commit is contained in:
Siu Kwan Lam 2013-02-27 18:28:15 -06:00
commit 8073b67c96

View file

@ -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)