artifacts

package
v0.0.0-...-355f60d Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package artifacts is responsible for generating and structuring artifacts directory

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	CovProfileCompletionMarker = "profile-completed"
	JunitXmlForTestgrid        = "junit_bazel.xml"
	LineCovFileName            = "line-cov.html"
)

Variables

This section is empty.

Functions

func LineCovFilePath

func LineCovFilePath(directory string) string

Types

type Artifacts

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

func New

func New(directory string, profileName string, keyProfileName string,
	covStdoutName string) *Artifacts

func (*Artifacts) CovStdoutPath

func (arts *Artifacts) CovStdoutPath() string

func (*Artifacts) Directory

func (arts *Artifacts) Directory() string

func (*Artifacts) JunitXmlForTestgridPath

func (arts *Artifacts) JunitXmlForTestgridPath() string

func (*Artifacts) KeyProfilePath

func (arts *Artifacts) KeyProfilePath() string

func (*Artifacts) LineCovFilePath

func (arts *Artifacts) LineCovFilePath() string

func (*Artifacts) ProfilePath

func (arts *Artifacts) ProfilePath() string

func (*Artifacts) SetDirectory

func (arts *Artifacts) SetDirectory(dir string)

type Intf

type Intf interface {
	ProfilePath() string
	KeyProfilePath() string
	ProfileReader() *ProfileReader
}

type LocalArtifacts

type LocalArtifacts struct {
	Artifacts
}

func NewLocalArtifacts

func NewLocalArtifacts(directory string, ProfileName string,
	KeyProfileName string, CovStdoutName string) *LocalArtifacts

func (*LocalArtifacts) KeyProfileCreator

func (arts *LocalArtifacts) KeyProfileCreator() *os.File

KeyProfileCreator creates a key profile file that will be used to hold a filtered version of coverage profile that only stores the entries that will be displayed by line coverage tool

func (*LocalArtifacts) ProduceProfileFile

func (arts *LocalArtifacts) ProduceProfileFile(covTargetsStr string)

ProduceProfileFile produce coverage profile (&its stdout) by running go test on target package for periodic job, produce junit xml for testgrid in addition

func (*LocalArtifacts) ProfileName

func (arts *LocalArtifacts) ProfileName() string

func (*LocalArtifacts) ProfileReader

func (arts *LocalArtifacts) ProfileReader() *ProfileReader

ProfileReader create and returns a ProfileReader by opening the file stored in profile path

type ProfileReader

type ProfileReader struct {
	io.ReadCloser
}

func NewProfileReader

func NewProfileReader(reader io.ReadCloser) *ProfileReader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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