testrunner

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTimedoutTestSummary

func AppendTimedoutTestSummary(existingResults []*types.IterationResult, ids []string) []*types.IterationResult

func BuildNoGPUTestSummary

func BuildNoGPUTestSummary() []*types.IterationResult

func CreateTarFile

func CreateTarFile(outputPath string, inputPaths []string) error

func ExtractLogFile

func ExtractLogFile(output string) (string, error)

ExtractLogFile uses a simple regex to find the json log file path

func GetAllGUIDs

func GetAllGUIDs(rocmSMIPath string) ([]string, error)

getAllGUIDs list all GUIDs from rocm-smi

func GetEventLabels

func GetEventLabels(category, trigger, recipe, hostName string, gpuIndexes, kfdIDs []string) map[string]string

func GetEventNamePrefix

func GetEventNamePrefix(testCategory string) string

func GetGUIDFromIndex

func GetGUIDFromIndex(index, rocmSMIPath string) (string, error)

getGUIDFromIndex use rocm-smi to get GUID from index number

func GetLogFilePath

func GetLogFilePath(resultLogDir, ts, trigger, testName, suffix string) string

func GetTestRunningLabelKeyValue

func GetTestRunningLabelKeyValue(category, recipe string, indexes []string) ([]string, string)

func LoadRunnerStatus

func LoadRunnerStatus(statusDBPath string) (*testrunnerGen.TestRunnerStatus, error)

func NewRvsTestRunner

func NewRvsTestRunner(rvsBinPath, testSuitesDir, resultLogDir string) (types.TestRunner, error)

NewRvsTestRunner returns instance of RvsTestRunner

func SaveRunnerStatus

func SaveRunnerStatus(statusObj *testrunnerGen.TestRunnerStatus, statusDBPath string) error

func SaveTestResultToGz

func SaveTestResultToGz(output, path string)

func UploadFileToCloudBucket

func UploadFileToCloudBucket(cloudProvider, cloudBucket, cloudFolder, cloudFileName, localFilePath, secretName string) error

func ValidateArgs

func ValidateArgs(testCategory, testTrigger, rvsPath, rocmSMIPath, testCaseDir, exporterSocketPath string)

ValidateArgs validate argument to make sure the mandatory tools/configs are available

Types

type GPUTestResult

type GPUTestResult struct {
	GPUID string `json:"gpu_id"`
	Pass  string `json:"pass,omitempty"`
}

GPUTestResult is struct for GPU ID and it's test result

type RVSTestRunner

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

TestRunner is a test framework for testing GPUs

func (*RVSTestRunner) GetTestHandler

func (rts *RVSTestRunner) GetTestHandler(testName string, params types.TestParams) (types.TestHandlerInterface, error)

GetTestHandler returns test handler for the given test and params

type TestResult

type TestResult map[string]map[string][]GPUTestResult

TestResult is used to convert test json output to struct

type TestRunner

type TestRunner struct {
	sync.Mutex // mutex to protect globalTestRunnerConfig from file watcher
	// contains filtered or unexported fields
}

func NewTestRunner

func NewTestRunner(rvsPath, rvsTestCaseDir, rocmSMIPath, exporterSocketPath, testRunnerConfigPath, testCategory, testTrigger, logDir, jobName, nodeName string) *TestRunner

initTestRunner init the test runner and related configs return the test location, either global or specific host name

func (*TestRunner) AddTestRunningLabel

func (tr *TestRunner) AddTestRunningLabel(recipe string, indexes []string)

func (*TestRunner) ReadPodInfo

func (tr *TestRunner) ReadPodInfo()

func (*TestRunner) RemoveTestRunningLabel

func (tr *TestRunner) RemoveTestRunningLabel(recipe string, indexes []string)

func (*TestRunner) TriggerTest

func (tr *TestRunner) TriggerTest()

the validation functions have make sure that the given category/location/trigger config exists and valid within runnerConfig this function will be responsible to trigger the test

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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