Exemplo n.º 1
0
    def commit_generate( self ):

        self.force_result = SysUtils.ifthen( SysUtils.success( self.force_retcode ), "PASS", "FAIL" )
        self.force_level = SummaryLevel.Any

        if SysUtils.failed( self.force_retcode ):
            self.force_level = SummaryLevel.Fail

        Msg.lout( self, "user" , "Performance Summary Item Commit Generate" )
        if SysUtils.success( self.force_retcode ):
            self.instruction_counts( )
            Msg.info( "Instructions: %d, Default: %d, Secondary: %d, Elapsed Time: %0.5f Seconds\n\n" % ( self.count, self.default, self.secondary, self.force_end - self.force_start ))
            return 1

        return 0
Exemplo n.º 2
0
    def load_gen_result(self, arg_dict):

        # Msg.lout( arg_dict, "dbg", "Generate Results Dictionary ... " )
        try:
            self.force_retcode = int(str(arg_dict["force-retcode"]).strip())
        except:
            self.force_retcode = -1
            Msg.err("Generate Return Code in unrecognizable format")

        self.force_stdout = arg_dict["force-stdout"]
        self.force_stderr = arg_dict["force-stderr"]

        if SysUtils.failed(self.force_retcode):
            self.force_level = SummaryLevel.Fail

        self.force_start = float(arg_dict.get("force-start", 0.00))
        self.force_end = float(arg_dict.get("force-end", 0.00))
Exemplo n.º 3
0
    def load_force_elog( self ):
        self.force_msg = None
        my_elog = "%s%s" % ( PathUtils.include_trailing_path_delimiter( self.work_dir ), self.force_elog )
        # Msg.dbg( my_elog )

        if SysUtils.failed( self.force_retcode ):
            Msg.fout( my_elog, "dbg" )
            with open(  my_elog , "r" ) as my_flog:
                try:
                    for my_line in my_flog:

                        if SysUtils.found( my_line.find( "[fail]" )):
                            self.force_msg = my_line.replace( "[fail]", "" ).strip()
                            # Msg.dbg( "Message: %s" % ( str( self.force_msg  )))
                            break
                finally:
                    my_flog.close()