Documentation
¶
Overview ¶
Package lacrosfaillog provides a way to record logs on test failure.
Index ¶
- func Save(ctx context.Context, tconn *chrome.TestConn)
- func SaveIf(ctx context.Context, tconn *chrome.TestConn, hasError func() bool)
- func StartRecord(ctx context.Context, tconn *chrome.TestConn) error
- func StopRecordAndSaveOnError(ctx context.Context, tconn *chrome.TestConn, hasRecordStarted bool, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Save ¶
Save saves a lacros specific faillog. If the faillog directory already exists then it does nothing. This is to support the use case of adding multiple calls to Save over a test, and only getting the faillog for the first failure. tconn should be the ash-chrome TestConn.
func SaveIf ¶
SaveIf saves a lacros specific faillog if the hasError closure returns true. The intended use for this is to pass testing.State's HasError to this. tconn should be the ash-chrome TestConn.
func StartRecord ¶
StartRecord starts screen record from keyboard. It clicks Ctrl+Shift+F5 then select to record the whole desktop. The caller should also call StopRecordFromKB to stop the screen recorder, and save the record file. For more, see https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/main/src/chromiumos/tast/local/chrome/uiauto/screen_recorder.go
func StopRecordAndSaveOnError ¶
func StopRecordAndSaveOnError(ctx context.Context, tconn *chrome.TestConn, hasRecordStarted bool, hasError func() bool)
StopRecordAndSaveOnError stops the screen record and saves it under lacros faillog dir if the hasError closure returns true and there is a record started.
Types ¶
This section is empty.