lsbrelease

package
v0.0.0-...-15a9a0c Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package lsbrelease provides a parser of /etc/lsb-release.

Usually Tast tests are not supposed to use information in /etc/lsb-release to change their behavior, so access to functions in this package is restricted unless explicitly permitted.

Index

Constants

View Source
const (
	// Board is a key for a board name (e.g. "eve")
	Board = "CHROMEOS_RELEASE_BOARD"

	// BuilderPath is a key for a string identifying the builder run that
	// produced the ChromeOS image (e.g. "eve-release/R74-12345.5.0").
	BuilderPath = "CHROMEOS_RELEASE_BUILDER_PATH"

	// Milestone is a key for milestone number (e.g. "74")
	Milestone = "CHROMEOS_RELEASE_CHROME_MILESTONE"

	// BuildNumber is a key for the major OS version number (e.g. "12345")
	BuildNumber = "CHROMEOS_RELEASE_BUILD_NUMBER"

	// BranchNumber is a key for the minor OS version number used by branch (e.g. "5")
	BranchNumber = "CHROMEOS_RELEASE_BRANCH_NUMBER"

	// PatchNumber is a key for the patch number (e.g. "0")
	PatchNumber = "CHROMEOS_RELEASE_PATCH_NUMBER"

	// Version is a key for ChromeOS version (e.g. "12345.5.0")
	Version = "CHROMEOS_RELEASE_VERSION"

	// ReleaseAppID is a key for the release Omaha app ID.
	ReleaseAppID = "CHROMEOS_RELEASE_APPID"

	// BoardAppID is a key for the board Omaha app ID.
	BoardAppID = "CHROMEOS_BOARD_APPID"

	// BuildType is a key for Chrome Release Build Type (e.g "Test Build - username")
	BuildType = "CHROMEOS_RELEASE_BUILD_TYPE"

	// ReleaseTrack is a key for the device's release track (e.g. "stable-channel")
	ReleaseTrack = "CHROMEOS_RELEASE_TRACK"

	// ReleaseDescription is a key for the device's release description (e.g. "12345.5.0 (Official Build) dev-channel eve test")
	ReleaseDescription = "CHROMEOS_RELEASE_DESCRIPTION"

	// ARCSDKVersion is a key for the Android SDK Version of the current
	// ARC image installed on the DUT.
	ARCSDKVersion = "CHROMEOS_ARC_ANDROID_SDK_VERSION"

	// ARCVersion is a key for the Android Version of the current ARC image
	// installed on the DUT
	ARCVersion = "CHROMEOS_ARC_VERSION"
)

Keys in /etc/lsb-release. See the following doc for details:

https://chromium.googlesource.com/chromiumos/docs/+/HEAD/os_config.md#LSB
View Source
const Path = "/etc/lsb-release"

Path is to the path for lsb-release file on the device.

Variables

This section is empty.

Functions

func Load

func Load() (map[string]string, error)

Load loads /etc/lsb-release and returns a parsed key-value map.

Usually Tast tests are not supposed to use information in /etc/lsb-release to change their behavior, so access to this function is restricted unless explicitly permitted by allowedPkgs.

func LoadFrom

func LoadFrom(path string) (map[string]string, error)

LoadFrom loads the LSB-release map from the given path, and returns a parsed key-value map.

func Parse

func Parse(r io.Reader) (map[string]string, error)

Parse parses a key-value text file in the /etc/lsb-release format, and returns a parsed key-value map.

Usually Tast tests are not supposed to use information in /etc/lsb-release to change their behavior, so access to this function is restricted unless explicitly permitted by allowedPkgs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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