ctestxml

package
v0.0.0-...-7a291f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: ISC Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJobID

func GenerateJobID(project, site, stamp, build string) string

func Parse

func Parse(r io.Reader, project string) (*model.Job, error)

Types

type Build

type Build struct {
	StartBuildTime  int64        `xml:"StartBuildTime"`
	EndBuildTime    int64        `xml:"EndBuildTime"`
	SourceDirectory string       `xml:"SourceDirectory"`
	BinaryDirectory string       `xml:"BinaryDirectory"`
	BuildCommand    string       `xml:"BuildCommand"`
	Diagnostics     []Diagnostic `xml:",any"`
	Failures        []Failure    `xml:"Failure"`
	Targets         []Target     `xml:"Targets>Target"`
	Commands        Commands     `xml:"Commands"`

	// Make sure they do not get catched by ",any"
	StartDateTime  struct{} `xml:"StartDateTime"`
	EndDateTime    struct{} `xml:"EndDateTime"`
	Log            struct{} `xml:"Log"`
	ElapsedMinutes struct{} `xml:"ElapsedMinutes"`
}

type Command

type Command struct {
	XMLName          xml.Name
	Version          int           `xml:"version,attr"`
	CommandLine      string        `xml:"command,attr"`
	WorkingDirectory string        `xml:"workingDir,attr"`
	Result           int           `xml:"result,attr"`
	Target           string        `xml:"target,attr"`
	TargetType       string        `xml:"targetType,attr"`
	TimeStart        int64         `xml:"timeStart,attr"`
	Duration         int64         `xml:"duration,attr"`
	Source           string        `xml:"source,attr"`
	Language         string        `xml:"language,attr"`
	Config           string        `xml:"config,attr"`
	Measurements     []Measurement `xml:"NamedMeasurement"`
}

func (Command) Role

func (c Command) Role() string

type Commands

type Commands struct {
	Commands []Command `xml:",any"`
}

type Configure

type Configure struct {
	StartConfigureTime int64    `xml:"StartConfigureTime"`
	EndConfigureTime   int64    `xml:"EndConfigureTime"`
	ConfigureCommand   string   `xml:"ConfigureCommand"`
	Log                string   `xml:"Log"`
	ConfigureStatus    int      `xml:"ConfigureStatus"`
	Commands           Commands `xml:"Commands"`
}

type Coverage

type Coverage struct {
	StartTime int64          `xml:"StartTime"`
	EndTime   int64          `xml:"EndTime"`
	Files     []CoverageFile `xml:"File"`
}

type CoverageFile

type CoverageFile struct {
	// Name           string   `xml:"Name,attr"`
	Path              string   `xml:"FullPath,attr"`
	LinesTested       *int     `xml:"LOCTested,omitempty"`
	LinesUntested     *int     `xml:"LOCUnTested,omitempty"`
	BranchesTested    *int     `xml:"BranchesTested,omitempty"`
	BranchesUntested  *int     `xml:"BranchesUnTested,omitempty"`
	FunctionsTested   *int     `xml:"FunctionsTested,omitempty"`
	FunctionsUntested *int     `xml:"FunctionsUnTested,omitempty"`
	Labels            []string `xml:"Labels>Label"`
}

type CoverageLog

type CoverageLog struct {
	StartTime int64             `xml:"StartTime"`
	EndTime   int64             `xml:"EndTime"`
	Files     []CoverageLogFile `xml:"File"`
}

type CoverageLogFile

type CoverageLogFile struct {
	Path  string            `xml:"FullPath,attr"`
	Lines []CoverageLogLine `xml:"Report>Line"`
}

type CoverageLogLine

type CoverageLogLine struct {
	Number int    `xml:"Number,attr"`
	Count  int    `xml:"Count,attr"`
	Text   string `xml:",innerxml"`
}

type Diagnostic

type Diagnostic struct {
	XMLName     xml.Name
	Line        int    `xml:"BuildLogLine"`
	Text        string `xml:"Text"`
	SourceFile  string `xml:"SourceFile"`
	SourceLine  int    `xml:"SourceLineNumber"`
	PreContext  string `xml:"PreContext"`
	PostContext string `xml:"PostContext"`
}

type Done

type Done struct {
	BuildID string `xml:"buildId"`
	Time    int64  `xml:"time"`
}

type DynamicAnalysis

type DynamicAnalysis struct {
	StartTime int64                 `xml:"StartTestTime"`
	EndTime   int64                 `xml:"EndTestTime"`
	Checker   string                `xml:"Checker,attr"`
	Tests     []DynamicAnalysisTest `xml:"Test"`
}

type DynamicAnalysisDefect

type DynamicAnalysisDefect struct {
	Type  string `xml:"type,attr"`
	Count int    `xml:",innerxml"`
}

type DynamicAnalysisTest

type DynamicAnalysisTest struct {
	Status      string                  `xml:"Status,attr"`
	Name        string                  `xml:"Name"`
	Path        string                  `xml:"Path"`
	FullName    string                  `xml:"FullName"`
	CommandLine string                  `xml:"FullCommandLine"`
	Defects     []DynamicAnalysisDefect `xml:"Results>Defect"`
	Log         Output                  `xml:"Log"`
}

type Failure

type Failure struct {
	Type             string   `xml:"type,attr"`
	Target           string   `xml:"Action>TargetName"`
	Language         string   `xml:"Action>Language"`
	SourceFile       string   `xml:"Action>SourceFile"`
	OutputFile       string   `xml:"Action>OutputFile"`
	OutputType       string   `xml:"Action>OutputType"`
	Argv             []string `xml:"Command>Argument"`
	WorkingDirectory string   `xml:"Command>WorkingDirectory"`
	StdOut           string   `xml:"Result>StdOut"`
	StdErr           string   `xml:"Result>StdErr"`
	ExitCondition    int      `xml:"Result>ExitCondition"`
	Labels           []string `xml:"Labels>Label"`
}

func (*Failure) CleanStdErr

func (f *Failure) CleanStdErr() string

func (*Failure) CleanStdOut

func (f *Failure) CleanStdOut() string

func (*Failure) CommandLine

func (f *Failure) CommandLine() string

func (*Failure) Diagnostics

func (f *Failure) Diagnostics() []model.Diagnostic

type Measurement

type Measurement struct {
	Name     string `xml:"name,attr"`
	Filename string `xml:"filename,attr"`
	Type     string `xml:"type,attr"`
	Value    []byte `xml:"Value"`
}

func (*Measurement) UnmarshalXML

func (o *Measurement) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Note

type Note struct {
	Name string `xml:"Name,attr"`
	Text string `xml:"Text"`
}

type Output

type Output struct {
	// contains filtered or unexported fields
}

func (*Output) UnmarshalXML

func (o *Output) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Response

type Response struct {
	XMLName xml.Name `xml:"cdash"`
	Status  string   `xml:"status"` // OK, ERROR
	Message string   `xml:"message,omitempty"`
	BuildID string   `xml:"buildId,omitempty"`
}

type Site

type Site struct {
	ChangeID                string           `xml:"ChangeId,attr"`
	BuildName               string           `xml:"BuildName,attr"`
	BuildStamp              string           `xml:"BuildStamp,attr"`
	Name                    string           `xml:"Name,attr"`
	Generator               string           `xml:"Generator,attr"`
	OSName                  string           `xml:"OSName,attr"`
	Hostname                string           `xml:"Hostname,attr"`
	OSRelease               string           `xml:"OSRelease,attr"`
	OSVersion               string           `xml:"OSVersion,attr"`
	OSPlatform              string           `xml:"OSPlatform,attr"`
	VendorString            string           `xml:"VendorString,attr"`
	VendorID                string           `xml:"VendorID,attr"`
	FamilyID                int              `xml:"FamilyID,attr"`
	ModelID                 int              `xml:"ModelID,attr"`
	ModelName               string           `xml:"ModelName,attr"`
	ProcessorCacheSize      int              `xml:"ProcessorCacheSize,attr"`
	NumberOfLogicalCPU      int              `xml:"NumberOfLogicalCPU,attr"`
	NumberOfPhysicalCPU     int              `xml:"NumberOfPhysicalCPU,attr"`
	TotalVirtualMemory      int              `xml:"TotalVirtualMemory,attr"`
	TotalPhysicalMemory     int              `xml:"TotalPhysicalMemory,attr"`
	ProcessorClockFrequency float32          `xml:"ProcessorClockFrequency,attr"`
	Subprojects             []Subproject     `xml:"Subproject"`
	Configure               *Configure       `xml:"Configure"`
	Build                   *Build           `xml:"Build"`
	Testing                 *Testing         `xml:"Testing"`
	Coverage                *Coverage        `xml:"Coverage"`
	CoverageLog             *CoverageLog     `xml:"CoverageLog"`
	DynamicAnalysis         *DynamicAnalysis `xml:"DynamicAnalysis"`
	Notes                   []Note           `xml:"Notes>Note"`
	Uploads                 []Upload         `xml:"Upload>File"`
}

type Subproject

type Subproject struct {
	Label string `xml:"Label"`
	Name  string `xml:"name,attr"`
}

type Target

type Target struct {
	Name     string   `xml:"name,attr"`
	Type     string   `xml:"type,attr"`
	Labels   []string `xml:"Labels>Label"`
	Commands Commands `xml:"Commands"`
}

type Test

type Test struct {
	Name         string        `xml:"Name"`
	Path         string        `xml:"Path"`
	FullName     string        `xml:"FullName"`
	Command      string        `xml:"FullCommandLine"`
	Status       string        `xml:"Status,attr"`
	Output       Output        `xml:"Results>Measurement>Value"`
	Measurements []Measurement `xml:"Results>NamedMeasurement"`
	Labels       []string      `xml:"Labels>Label"`
}

type Testing

type Testing struct {
	StartTime int64  `xml:"StartTestTime"`
	EndTime   int64  `xml:"EndTestTime"`
	Tests     []Test `xml:"Test"`
}

type TimedCommands

type TimedCommands struct {
	Commands  []model.Command
	StartTime time.Time
	EndTime   time.Time
}

type TimedCovarage

type TimedCovarage struct {
	Files     []model.Coverage
	StartTime time.Time
	EndTime   time.Time
}

type Update

type Update struct {
	Mode       string       `xml:"mode,attr"`
	Generator  string       `xml:"Generator,attr"`
	Site       string       `xml:"Site"`
	BuildName  string       `xml:"BuildName"`
	BuildStamp string       `xml:"BuildStamp"`
	StartTime  int64        `xml:"StartTime"`
	EndTime    int64        `xml:"EndTime"`
	Command    string       `xml:"UpdateCommand"`
	Type       string       `xml:"UpdateType"`
	Revision   string       `xml:"Revision"`
	Status     string       `xml:"UpdateReturnStatus"`
	Files      []UpdateFile `xml:"Directory>Updated"`
}

type UpdateFile

type UpdateFile struct {
	FullName       string `xml:"FullName"`
	Author         string `xml:"Author"`
	Email          string `xml:"Email"`
	CheckinDate    string `xml:"CheckinDate"`
	Committer      string `xml:"Committer"`
	CommitterEmail string `xml:"CommitterEmail"`
	CommitDate     string `xml:"CommitDate"`
	Log            string `xml:"Log"`
	Revision       string `xml:"Revision"`
}

type Upload

type Upload struct {
	Name    string `xml:"filename,attr"`
	Content []byte `xml:"Content"`
}

func (*Upload) UnmarshalXML

func (o *Upload) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL