summaryrefslogtreecommitdiffstats
path: root/test/AS/nasm.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2018-09-05 03:12:28 (GMT)
committerGitHub <noreply@github.com>2018-09-05 03:12:28 (GMT)
commit9ffc1c047ff128db751d8e48faf1f2fdbfd460f5 (patch)
treeba87f63f57737e8f3e01e1aa59a8a3d4cbfcc099 /test/AS/nasm.py
parent2915abd83891c89e0302cf3f35e367de55c0abab (diff)
parentc594a4de15f55c1f1d5582c086e3021c589b4c41 (diff)
downloadSCons-9ffc1c047ff128db751d8e48faf1f2fdbfd460f5.zip
SCons-9ffc1c047ff128db751d8e48faf1f2fdbfd460f5.tar.gz
SCons-9ffc1c047ff128db751d8e48faf1f2fdbfd460f5.tar.bz2
Merge branch 'master' into test-rpmpkg
Diffstat (limited to 'test/AS/nasm.py')
-rw-r--r--test/AS/nasm.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/AS/nasm.py b/test/AS/nasm.py
index 1733789..4d93c7f 100644
--- a/test/AS/nasm.py
+++ b/test/AS/nasm.py
@@ -47,17 +47,18 @@ 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':
+ stdout = stdout.decode()
+ 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 +79,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 +102,7 @@ name:
""")
test.write('eee_main.c', r"""
+#include <stdio.h>
extern char name[];
int