New issue
Advanced search Search tips

Issue 804128 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

tast: Automatically add attributes containing test name and bundle

Project Member Reported by derat@chromium.org, Jan 21 2018

Issue description

Tast's testing.Test struct should automatically add attributes to each test containing its name and bundle, probably along the lines of "name:ui.ChromeSanity" and "bundle:cros".

I should update the BVT suite's attribute expression to include bundle:cros; this will ensure that it only matches Chrome OS tests, even if other remote test bundles have been compiled on the system where the tast command is running.

Name-based attributes could be convenient if someone wants to exclude individual tests while using attribute expressions.
 

Comment 1 by derat@chromium.org, Jan 23 2018

Components: Tests>Tast

Comment 2 by derat@chromium.org, Jan 26 2018

Status: Started (was: Assigned)

Comment 3 by derat@chromium.org, Jan 30 2018

Status: Verified (was: Started)
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/4aa6e579ac62889ac923d3af6201275be8a6d891

commit 4aa6e579ac62889ac923d3af6201275be8a6d891
Author: Daniel Erat <derat@chromium.org>
Date: Tue Jan 30 00:38:32 2018

tast: Automatically add "name:" and "bundle:" attributes.

Automatically add "name:category.Foo" and "bundle:bar"
attributes to tests. The former allows individual tests to
be referenced in attribute expressions, while the latter
allows a specific bundle to be specified when running a
suite on a system that may have multiple bundles installed.

Also improve error messages for bad expressions and update
the testing/attr package to permit attribute names to be
double-quoted (required when attributes don't consist of
letters/underscores followed by letters/digits/underscores).

BUG=chromium:804495
TEST=added unit tests; also performed manual runs with
     various attribute expressions, e.g.
     '(chrome && bvt && !arc && !"name:ui.ChromeSanity")'

Change-Id: I483c936a99d4dbea2eeec62768deb4564165aecc
Reviewed-on: https://chromium-review.googlesource.com/890620
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/src/chromiumos/tast/testing/attr/attr_test.go
[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/src/chromiumos/tast/testing/test.go
[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/src/chromiumos/tast/testing/registry.go
[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/src/chromiumos/tast/testing/attr/attr.go
[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/src/chromiumos/tast/testing/test_test.go
[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/docs/test_attributes.md
[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/src/chromiumos/tast/bundle/bundle.go
[modify] https://crrev.com/4aa6e579ac62889ac923d3af6201275be8a6d891/docs/running_tests.md

Sign in to add a comment