Exemplo n.º 1
0
 def part_begin( self, attrs ):
     part = Part()
     part.number = int(attrs['number'])
     part.result = attrs['result']
     self.part.append(part)
     self.scoreboard.event['part_begin'].publish(
         gantlet.events.part_begin_event, ( self, part.number ) )
Exemplo n.º 2
0
 def part_begin(self, attrs):
     part = Part()
     part.number = int(attrs['number'])
     part.result = attrs['result']
     self.part.append(part)
     self.scoreboard.event['part_begin'].publish(
         gantlet.events.part_begin_event, (self, part.number))
Exemplo n.º 3
0
    def __init__( self, raw_name, scoreboard, type, exit_status ):
        """
        create, parse, and store result of a process

        raw_name - the unmodified argument
        scoreboard - the communication hub for events
        type -
        exit_status - the integer exit status
        """
        result_base.__init__( self, raw_name, scoreboard, type )
        self.name = "%s (%s)" % ( self.raw_name, "exit" )
        self.exit_status = exit_status
        # declare the test
        self.number = self.scoreboard.get_id()
        self.declared_nparts = 1
        self.n_parts = 1
        self.scoreboard.event['test_begin'].publish( gantlet.events.test_begin_event, self )
        # create a single part
        partno = 1
        part = Part()        
        part.number = partno
        self.part.append(part)
        self.scoreboard.event['part_begin'].publish( gantlet.events.part_begin_event, (self, partno) )
        # declare the result
        result = ''
        if self.exit_status == None:
            result = 'PASS'
        elif self.exit_status == 77:
            result = 'XFAIL'
        else:
            result = 'FAIL'
        part.result = result
        self.scoreboard.event['part_end'].publish( gantlet.events.part_end_event, (self, partno) )
        # now deal with the end
        self.declared_result = result
        self.PTC_confirm_nparts()
        self.PTC_confirm_result()
        self.scoreboard.event['test_end'].publish( gantlet.events.test_end_event, self )