diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-08-20 01:01:34 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2018-08-20 01:01:34 (GMT) |
commit | 9968415b4bbb46ab95023077844590b962e1ffcf (patch) | |
tree | 1b3c10866b02f5efd1c4d61fc2d8aa1bba84f91f | |
parent | 90b285240e9d80a6f4b2eb9d294ba9e789fd269d (diff) | |
download | SCons-9968415b4bbb46ab95023077844590b962e1ffcf.zip SCons-9968415b4bbb46ab95023077844590b962e1ffcf.tar.gz SCons-9968415b4bbb46ab95023077844590b962e1ffcf.tar.bz2 |
Fix test/AS/nasm.py as it previously would only run with nasm version 0.98
-rw-r--r-- | test/AS/nasm.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/AS/nasm.py b/test/AS/nasm.py index 1733789..4d57951 100644 --- a/test/AS/nasm.py +++ b/test/AS/nasm.py @@ -47,17 +47,17 @@ if sys.platform.find('linux') == -1: test.skip_test("skipping test on non-Linux platform '%s'\n" % sys.platform) try: - import popen2 - stdout = popen2.popen2('nasm -v')[0] + import subprocess + stdout = subprocess.check_output(['nasm','-v']) except OSError: test.skip_test('could not determine nasm version; skipping test\n') else: - version = stdout.read().split()[2] - if version[:4] != '0.98': + version = stdout.split()[2].split('.') + if int(version[0]) ==0 and int(version[1]) < 98: test.skip_test("skipping test of nasm version %s\n" % version) machine = os.uname()[4] - if not machine in ('i386', 'i486', 'i586', 'i686'): + if not machine in ('i386', 'i486', 'i586', 'i686', 'x86_64'): fmt = "skipping test of nasm %s on non-x86 machine '%s'\n" test.skip_test(fmt % (version, machine)) @@ -78,6 +78,8 @@ test.file_fixture('wrapper.py') test.write('SConstruct', """ eee = Environment(tools = ['gcc', 'gnulink', 'nasm'], + CFLAGS = ['-m32'], + LINKFLAGS = '-m32', ASFLAGS = '-f %(nasm_format)s') fff = eee.Clone(AS = r'%(_python_)s wrapper.py ' + WhereIs('nasm')) eee.Program(target = 'eee', source = ['eee.asm', 'eee_main.c']) @@ -99,6 +101,7 @@ name: """) test.write('eee_main.c', r""" +#include <stdio.h> extern char name[]; int |