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 ¶
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
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 ¶
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 ¶
LoadFrom loads the LSB-release map from the given path, and returns a parsed key-value map.
func Parse ¶
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.