rundata

package
v0.0.0-...-56ce121 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package rundata collects the runtime data from the test environment.

The values collected are:

  • build.go_version - from runtime/debug.BuildInfo.GoVersion
  • build.path - from runtime/debug.BuildInfo.Path
  • build.main.path - from runtime/debug.BuildInfo.Main.Path
  • build.main.version - from runtime/debug.BuildInfo.Main.Version
  • build.main.sum - from runtime/debug.BuildInfo.Main.Sum
  • For each build setting obtained from runtime/debug.BuildInfo.Settings: build.settings.key - the key and the value from runtime/debug.BuildSetting. Note: vcs details are missing when run from a git local working directory. This is why we include the git properties below.
  • git.commit - git commit hash of the Feature Profiles repo, shown by git show -s --format=%H.
  • git.commit_timestamp - git commit timestamp of the Feature Profiles repo, shown by git show -s --format=%ct (in Unix epoch seconds).
  • git.origin - the output of git config --get remote.origin.url which should be either: https://github.com/openconfig/featureprofiles git@github.com:openconfig/featureprofiles.git Please talk to us if you need to run tests from a fork, e.g. with local modifications that have not being merged to our main repo.
  • git.clean - true if the current working directory is clean (i.e. the output of git status --short is empty), or false otherwise.
  • git.status - the output of git status --short which should be empty if the working directory is clean.
  • test.path - the package path of the test, relative to the git local working directory.
  • test.plan_id - test plan ID that is optionally reported by the test. See below.
  • topology - a summary of the testbed topology formatted as a comma separated list of devices in the topology and the number of ports they provide, ordered by the device ID, e.g. "ate:12,dut:12" - represents the atedut_12.testbed, "dut1:4,dut2:4" - represents the dutdut.testbed. The testbed summary is discoverable using the binding reservation, whereas the testbed filename is not.
  • dut.vendor - the vendor of the DUT.
  • dut.model - the vendor model name of the DUT.
  • dut.os_version - the OS version running on the DUT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Properties

func Properties(ctx context.Context, resv *binding.Reservation) map[string]string

Properties builds the test properties map representing run data.

func Timing

func Timing(context.Context) map[string]string

Timing builds the test properties with the begin and end times.

Types

type DUTInfo

type DUTInfo struct {
	Vendor string
	Model  string
	OSVer  string
}

DUTInfo retrieves the vendor, model, and OS version from the device from various OpenConfig paths.

func NewDUTInfo

func NewDUTInfo(ctx context.Context, gnmic gpb.GNMIClient) (*DUTInfo, error)

NewDUTInfo creates a newly populated DUTInfo.

Jump to

Keyboard shortcuts

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