Clone this repo:
  1. 2c69dd7 README: fix links by Harry Cutts · 13 days ago master
  2. f023614 Decode standard output when recompilation fails by Harry Cutts · 13 days ago
  3. ec8fc23 Add tests to validate scroll behavior on BT mouse by Jora Jacobi · 10 weeks ago factory-endeavour-13295.B firmware-endeavour-13259.B firmware-puff-13324.B release-R85-13310.B stabilize-13360.B stabilize-lazor-13278.B
  4. e70279e Don't list irrelevant baseline tests by Sean O'Brien · 3 months ago release-R84-13099.B stabilize-13099.70.B stabilize-13099.72.B stabilize-13099.73.B stabilize-13099.85.B stabilize-13099.90.B
  5. 4f5a88c Add `--presubmit` for gestures library presubmit by Harry Cutts · 3 months ago factory-drallion-13080.B

Touch tests

Introduction

This repository contains automated tests for Chromium OS's Gestures library. Each test has a log of evdev events which are replayed, a properties file containing gesture properties to set while the Gestures library runs, and a Python function which verifies the output and returns a test score.

Setting up

Assuming that you've followed the developer guide, simply run the following inside your chroot:

(inside)
$ cd ~/trunk/src/platform/touchpad-tests
$ sudo make setup-in-place

Running tests

To run all tests, simply run touchtests. To run one or more specific tests, you can pass a test name or a glob:

(inside)
$ touchtests atlas-1.0/fat-thumb-fail
$ touchtests atlas-1.0/palm-while-typing*

Each test will return a status, with the following meanings:

  • success: the test succeeded, with the given score out of 1.
  • failure: the test failed.
  • error: an error occurred while running the test, so the behavior of the gestures library couldn't be evaluated.
  • incomplete: (baseline tests only) the evdev log for this platform hasn't been created.

Checking for regressions

The --out (or -o) switch creates a report file that future runs can be compared against with the --ref (or -r) switch:

(inside)
$ touchtests --out baseline.json
# (cause some regressions)
$ touchtests --ref baseline.json

The output table will contain a delta column that indicates any regressions or improvements, and an error message will be shown if regressions exist.