PSA: Tast Remote Root Fixture

19 views
Skip to first unread message

Seewai Fu

unread,
May 2, 2024, 12:43:31 PMMay 2
to tast-users

go/tast_remote_root_fixture_psa

TL;DR

Tast now supports a remote root fixture which allows test writers to add hooks that affect every test (except test with Pre-Condition) in a Tast session. Those hooks can perform different functions such as checking DUT state between tests.  Please see go/tast_remote_root_fixture_dsgn for the details of remote root fixture.

Overview

All tests and fixtures will depend on the remote root fixture directly or indirectly. The Setup phase of the remote root fixture which will be run at the beginning of the execution of a Tast bundle. It can allow different hooks to be run during phases of the remote root fixture: Setup, PreTest,  Reset, PostTest, and TearDown. Hook writers can do something applicable to all tests. 

Potential Applications 

Here are a few potential (but not limited to) applications of the hooks.


  1. Make framework level interaction with Servo.

    1. Checkpoint servod log at Setup

    2. Collect servod logs at Teardown.

  2. Checking DUT status between tests.

    1. Check DUT status at PreTest.

    2. Check DUT status at PostTest

    3. Flag tests that may have corrupted the DUT.

Policy On Creating Hooks

Since hooks can affect every test and fixture in a Tast session, we need to be careful about what hooks can go in the remote root fixture. Here is the policy that we have at this moment. The policy may be revised in future.


  1. All hook related CLs have to be reviewed and approved by Tast team members.

  2. An 1-pager should be sent to Tast team to review in advance.

  3. For more complicated hooks, proper design documents should be reviewed. 

  4. Most hooks should be guarded by Tast global runtime variables  which means that most hooks should only be triggered when the corresponding runtime variables are set.

This is the only initial policy. It may be revised in future and the revision will be posted on the go/tast-docs. Currently, go/tast-docs has not been updated to reflect changes related to the Tast remote root fixture. It will be updated in the coming days. 

Potential Short Term Issues

There are changes for all Tast related repos (tast, tast-tests, …). All changes depend on each other. Users may see compilation errors or runtime errors like undefined fixture “tastRootRemoteFixture”. If so, please make sure all Tast related repos are synchronized. If you continue to see remote root fixture issues, please don’t hesitate to contact Tast team.

Contact

tast...@google.com


Reply all
Reply to author
Forward
0 new messages