Documentation ¶
Overview ¶
Package updateutil implements helpers for autoupdate tests.
Index ¶
- Constants
- func EntryFromLSBRelease(ctx context.Context, dut *dut.DUT, rpcHint *testing.RPCHint, key string) (string, error)
- func FillFromLSBRelease(ctx context.Context, dut *dut.DUT, rpcHint *testing.RPCHint, ...) error
- func ImageBuilderPath(ctx context.Context, dut *dut.DUT, rpcHint *testing.RPCHint) (string, error)
- func ImageVersion(ctx context.Context, dut *dut.DUT, rpcHint *testing.RPCHint) (string, error)
- func UpdateFromGS(ctx context.Context, dut *dut.DUT, outdir string, rpcHint *testing.RPCHint, ...) (retErr error)
- type Board
- type Delta
- type Paygen
Constants ¶
const UpdateTimeout = 15 * time.Minute
UpdateTimeout is the time needed to download image and install it to DUT.
Variables ¶
This section is empty.
Functions ¶
func EntryFromLSBRelease ¶
func EntryFromLSBRelease(ctx context.Context, dut *dut.DUT, rpcHint *testing.RPCHint, key string) (string, error)
EntryFromLSBRelease is a wrapper for FillFromLSBRelease to get a single entry from the /etc/lsb-realse file with a simpler call.
func FillFromLSBRelease ¶
func FillFromLSBRelease(ctx context.Context, dut *dut.DUT, rpcHint *testing.RPCHint, req map[string]string) error
FillFromLSBRelease fills map[string]string it gets as input with values form the /etc/lsb-realse file based on matching keys.
func ImageBuilderPath ¶
ImageBuilderPath gets the DUT image builder path from the parsed /etc/lsb-realse file.
func ImageVersion ¶
ImageVersion gets the DUT image version from the parsed /etc/lsb-realse file.
func UpdateFromGS ¶
func UpdateFromGS(ctx context.Context, dut *dut.DUT, outdir string, rpcHint *testing.RPCHint, builderPath string) (retErr error)
UpdateFromGS updates the DUT to an image found in the Google Storage under the builder path folder. It saves the logs (udpdate engine logs and Nebraska logs) to the given outdir.
Types ¶
type Board ¶
type Board struct { PublicCodename string `json:"public_codename"` IsActive bool `json:"is_active"` BuilderName string `json:"builder_name"` }
Board stores the board related data in a Delta.
type Delta ¶
type Delta struct { Board Board `json:"board"` DeltaType string `json:"delta_type"` Channel string `json:"channel"` ChromeOSVersion string `json:"chrome_os_version"` ChromeVersion string `json:"chrome_version"` Milestone int `json:"milestone"` GenerateDelta bool `json:"generate_delta"` DeltaPayloadTests bool `json:"delta_payload_tests"` FullPayloadTests bool `json:"full_payload_tests"` Models []string `json:"applicable_models"` }
Delta describes an update delta in the paygen.json file.
type Paygen ¶
type Paygen struct {
Deltas []Delta `json:"delta"`
}
Paygen is a structure that can hold the unmarshaled paygen.json data.
func LoadPaygenFromGS ¶
LoadPaygenFromGS downloads the paygen.json file, parses it, and returns it in a Paygen object.
func (Paygen) FilterBoard ¶
FilterBoard filters for a specific board string.
func (*Paygen) FilterBoardChannelDeltaType ¶
FilterBoardChannelDeltaType filters the deltas based on the board, channel and delta type. This is the most common filter combination, so it is done in one call.
func (Paygen) FilterDeltaType ¶
FilterDeltaType filters by type.
func (Paygen) FilterMilestone ¶
FilterMilestone filters the deltas based on the milestone.
func (*Paygen) FindLatest ¶
FindLatest returns the Delta with the highest Chrome OS Version value.