Clone this repo:
  1. 4c00d57 touchpad-tests: update chroot path in doc by Saketh Pothireddy · 13 days ago main release-R125-15853.B stabilize-15855.B stabilize-15857.B
  2. b42eccb Update copyright block for new tests by seobrien · 4 months ago factory-geralt-15840.B firmware-geralt-15842.B release-R123-15786.B release-R124-15823.B stabilize-15756.B stabilize-15786.48.B stabilize-15786.58.B stabilize-15793.B stabilize-15828.B stabilize-quickfix-15786.49.B
  3. 5fd2eb3 Test for fast mouse scroll from batched BT events by seobrien · 4 months ago
  4. a7fda17 Make score threshold for regression more lenient by seobrien · 6 months ago factory-brya-15684.B factory-rex-15708.B firmware-rex-15709.B release-R120-15662.B release-R121-15699.B release-R122-15753.B stabilize-15662.64.B stabilize-15662.76.B stabilize-15662.78.B stabilize-15662.80.B stabilize-15662.88.B stabilize-15677.B stabilize-15699.58.B stabilize-15699.66.B stabilize-15714.B stabilize-15753.46.B stabilize-15753.55.B stabilize-quickfix-15662.77.B
  5. 6a1a3f5 Add test for tap-drag failure on redrix by Sean O'Brien · 12 months ago firmware-cr50-efi-15611.28.B firmware-cr50-mp-15611.B firmware-cr50-prepvt-15608.B release-R115-15474.B release-R116-15509.B release-R117-15572.B release-R118-15604.B release-R119-15633.B stabilize-15474.38.B stabilize-15474.53.B stabilize-15474.70.B stabilize-15483.B stabilize-15485.B stabilize-15509.37.B stabilize-15509.63.B stabilize-15509.72.B stabilize-15511.B stabilize-15519.B stabilize-15531.B stabilize-15532.B stabilize-15561.B stabilize-15562.B stabilize-15563.B stabilize-15564.B stabilize-15572.16.B stabilize-15572.39.B stabilize-15572.4.B stabilize-15572.50.B stabilize-15572.57.B stabilize-15572.63.B stabilize-15588.B stabilize-15604.16.B stabilize-15604.45.B stabilize-15604.56.B stabilize-15604.57.B stabilize-15610.B stabilize-15633.44.B stabilize-15633.58.B stabilize-15633.69.B stabilize-15642.B stabilize-15654.B

Touch tests


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:

$ cd ~/chromiumos/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:

$ 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:

$ 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.