Edgewall Software
Modify

Opened 17 years ago

Last modified 8 years ago

#203 new defect

HTTP Error 500 on failed CPP Unit Test

Reported by: joel -at- oneac.com Owned by: cmlenz
Priority: critical Milestone: 0.6.1
Component: Build master Version: dev
Keywords: Cc:
Operating System: Linux

Description

Running trunk rev 515.

500 Server Error occurs if the unit test step fails .. in this case, it is failing in such a way that there is no XML output. (Test runner crashed)

This is a serious problem because this particular build keeps going over-and-over forever, because the master never registers it as completed.

Error traceback from trac.log:

2007-10-30 11:17:10,507 Trac[__init__] ERROR: 'NoneType' object has no attribute 'status'
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/Bitten-0.6dev_r515-py2.4.egg/bitten/master.py", line 93, in process_request
    return self._process_build_step(req, config, build)
  File "/usr/lib/python2.4/site-packages/Bitten-0.6dev_r515-py2.4.egg/bitten/master.py", line 264, in _process_build_step
    if step.status == BuildStep.FAILURE:
AttributeError: 'NoneType' object has no attribute 'status'

Attachments (0)

Change History (3)

comment:1 Changed 17 years ago by joel -at- oneac.com

The slave is running bitten trunk r502 on cygwin.

comment:2 Changed 15 years ago by osimons

  • Milestone changed from 0.6 to 0.6.1

Could you please try with latest trunk/0.6dev? Following [702] it should be better at handling errors.

comment:3 Changed 9 years ago by anonymous

Not sure if I should be creating a new ticket. I'm having the same problem with the latest trunk revision (1027) I'm running tests using xunit -xml output that gets transformed by xsl:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" cdata-section-elements="stdout" />
    <xsl:template match="/">
        <report category="test">
            <xsl:apply-templates />
        </report>
    </xsl:template>
    <xsl:template match="//assemblies/assembly/collection/test">
        <test>
            <status>
                <xsl:if test="@result = 'Pass'">success</xsl:if>
                <xsl:if test="@result != 'Pass'">failure</xsl:if>
            </status>
            <fixture><xsl:value-of select="../@name" /></fixture>
            <name><xsl:value-of select="@name" /></name>
            <duration><xsl:value-of select="@time" /></duration>
			<xsl:if test="@result = 'Fail'">
				<stdout><xsl:value-of select="failure/message" /></stdout>
			</xsl:if>
        </test>
    </xsl:template>
</xsl:stylesheet>

If I leave out the stdout output the test completes successfully, but if I include the stdout the server crashes with a 500 server error. I try the transformation using xmlstarlet and it seems to do the right thing. I've tried both with and without the cdata-section-elements, but that does not seem to change much.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain cmlenz.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.