lsbrelease

package
v0.0.0-...-d046166 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 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 Chrome OS image (e.g. "eve-release/R74-12345.0.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 build number (e.g. "12345")
	BuildNumber = "CHROMEOS_RELEASE_BUILD_NUMBER"

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

	// Version is a key for Chrome OS version (e.g. "12345.0.0")
	Version = "CHROMEOS_RELEASE_VERSION"

	// ReleaseAppID is a key for the release Omaha app ID.
	ReleaseAppID = "CHROMEOS_RELEASE_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"

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

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

https://chromium.googlesource.com/chromiumos/docs/+/master/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