Don't list irrelevant baseline tests

The baseline tests for click, drag, fling, etc. apply only
to touchpad devices.  If the device is not a touchpad, don't look
for these baseline tests.

BUG=None
TEST=Run touchtests after setting device_class to "mouse" for some
devices. Incomplete baseline tests aren't listed for those devices, but
completed baseline tests are.

Change-Id: Id2dbc383d6f1b6158fe917ae698951648a559aaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/touchpad-tests/+/2195184
Tested-by: Sean O'Brien <seobrien@chromium.org>
Tested-by: Jora Jacobi <jora@google.com>
Auto-Submit: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Jora Jacobi <jora@google.com>
Reviewed-by: Harry Cutts <hcutts@chromium.org>
Commit-Queue: Sean O'Brien <seobrien@chromium.org>
diff --git a/framework/src/test_case.py b/framework/src/test_case.py
index b8b7b4d..4d3eb47 100755
--- a/framework/src/test_case.py
+++ b/framework/src/test_case.py
@@ -293,7 +293,10 @@
     all_cases = []
     for platform in TestCase.DiscoverPlatforms(tests_dir):
       validators = ListCases(tests_dir, platform)
-      validators.update(common_validators)
+      device_class = TestCase(tests_dir,
+              path.join(platform, "dummy")).device_class
+      if device_class is None or device_class == "touchpad":
+        validators.update(common_validators)
 
       test_cases = map(lambda f: TestCase(tests_dir, path.join(platform, f)),
                        validators)