Closed GoogleCodeExporter closed 9 years ago
Thanks for the patch.
Really this test should raise NotRunError if it can't do the compile,
so that the test shows up as NOTRUN rather than as OK.
Could you test the following alternative patch, based on yours, which addresses
that
issue?
If that works on your system too, I'll go ahead and submit it.
Index: testdistcc.py
===================================================================
--- testdistcc.py (revision 673)
+++ testdistcc.py (working copy)
@@ -1917,11 +1917,13 @@
def setup(self):
WithDaemon_Case.setup(self)
open('test2.S', 'wt').write(self.asm_source)
-
+
def compile(self):
- if sys.platform == 'linux2':
+ if sys.platform == 'linux2' and os.uname()[4] <> 'armv4tl':
self.runcmd(self.distcc()
+ "-o test2.o -c test2.S")
+ else:
+ raise comfychair.NotRunError ('this test is system-specific')
def runtest(self):
self.compile()
Original comment by fergus.h...@gmail.com
on 21 May 2009 at 5:30
Attachments:
Original comment by fergus.h...@gmail.com
on 21 May 2009 at 5:54
Thanks for your fast reply.
Your path works but I suspect I misunderstod the isue:
if you look at the previous class RemoteAssemble_Case gives exactly the same errors
(they are the same code after the preprocessor) and get a OK.
I have modified it to run the test and it fails with the followin output:
PreprocessAsm_Case FAIL
-----------------------------------------------------------------
Traceback (most recent call last):
File "/home/distcc/distcc-3.1/test/comfychair.py", line 355, in runtest
obj.runtest()
File "./test/testdistcc.py", line 1861, in runtest
self.compile()
File "./test/testdistcc.py", line 1856, in compile
+ "-o test2.o -c test2.S")
TypeError: bad operand type for unary +: 'str'
test_log:
Run command: distccd --verbose --lifetime=60 --daemon --log-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/distccd.log' --pid-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/daemonpid.tmp' --port 42000
--allow 127.0.0.1
Wait status: 0x6600 (exit code 102, signal 0)
stdout:
stderr:
Run command: distccd --verbose --lifetime=60 --daemon --log-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/distccd.log' --pid-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/daemonpid.tmp' --port 42001
--allow 127.0.0.1
Wait status: 0x0 (exit code 0, signal 0)
stdout:
stderr:
-----------------------------------------------------------------
Original comment by perezd...@gmail.com
on 21 May 2009 at 9:14
I have found the reason for the test failure; on arm assembler the "@" is
allways
the start of a comment.
The attached patch is tested on arm and i386
Original comment by perezd...@gmail.com
on 26 May 2009 at 12:55
Attachments:
Thanks for the patch. I split the patch into two, and made a couple of minor
adjustments and applied them in revisions 712 and 717.
Revision 712:
Index: test/testdistcc.py
===================================================================
--- test/testdistcc.py (revision 712)
+++ test/testdistcc.py (revision 713)
@@ -1917,11 +1917,13 @@
def setup(self):
WithDaemon_Case.setup(self)
open('test2.S', 'wt').write(self.asm_source)
-
+
def compile(self):
if sys.platform == 'linux2':
self.runcmd(self.distcc()
+ "-o test2.o -c test2.S")
+ else:
+ raise comfychair.NotRunError ('this test is system-specific')
def runtest(self):
self.compile()
Revision 717:
Index: test/testdistcc.py
===================================================================
--- test/testdistcc.py (revision 716)
+++ test/testdistcc.py (revision 717)
@@ -1871,6 +1871,7 @@
# We have a rather tricky method for testing assembly code when we
# don't know what platform we're on. I think this one will work
# everywhere, though perhaps not.
+ # We don't use @ because that starts comments for ARM.
asm_source = """
.file "foo.c"
.globl msg
@@ -1879,7 +1880,7 @@
.string "hello world"
.data
.align 4
- .type msg,@object
+ .type msg,object
.size msg,4
msg:
.long .LC0
@@ -1908,7 +1909,7 @@
.string MSG
.data
.align 4
- .type msg,@object
+ .type msg,object
.size msg,4
msg:
.long .LC0
Original comment by fergus.h...@gmail.com
on 2 Mar 2010 at 8:27
Original issue reported on code.google.com by
perezd...@gmail.com
on 21 May 2009 at 2:13