| # Copyright 2017 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| public_deps = [ ":input_reader_tests" ] |
| } |
| |
| test_package("input_reader_tests") { |
| deps = [ |
| ":input_apptests", |
| ":input_reader_unittests", |
| ] |
| |
| tests = [ |
| { |
| name = "input_apptests" |
| environments = basic_envs |
| }, |
| { |
| name = "input_reader_unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| executable("input_apptests") { |
| testonly = true |
| |
| deps = [ |
| ":end_to_end_tests", |
| ":interface_tests", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| source_set("end_to_end_tests") { |
| visibility = [ ":*" ] |
| testonly = true |
| |
| sources = [ "end_to_end_tests.cc" ] |
| |
| deps = [ |
| ":mock_device_watcher", |
| ":mock_hid_decoder", |
| "//garnet/public/lib/gtest", |
| "//sdk/fidl/fuchsia.ui.input", |
| "//src/ui/lib/input_reader", |
| "//src/ui/testing:mock_input_device", |
| "//zircon/public/lib/hid", |
| "//zircon/system/ulib/hid-parser", |
| ] |
| } |
| |
| source_set("interface_tests") { |
| visibility = [ ":*" ] |
| testonly = true |
| |
| sources = [ "interface_tests.cc" ] |
| |
| deps = [ |
| "//garnet/public/lib/gtest", |
| "//sdk/fidl/fuchsia.ui.input", |
| "//src/ui/testing:mock_input_device", |
| "//zircon/public/lib/hid", |
| "//zircon/system/ulib/hid-parser", |
| ] |
| } |
| |
| source_set("mock_device_watcher") { |
| sources = [ |
| "mock_device_watcher.cc", |
| "mock_device_watcher.h", |
| ] |
| |
| public_deps = [ "//src/ui/lib/input_reader:device" ] |
| |
| deps = [ |
| "//src/lib/fxl", |
| "//zircon/system/ulib/hid-parser", |
| ] |
| } |
| |
| source_set("mock_hid_decoder") { |
| sources = [ |
| "mock_hid_decoder.cc", |
| "mock_hid_decoder.h", |
| ] |
| |
| public_deps = [ |
| "//src/ui/lib/input_reader:device", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| ] |
| |
| deps = [ |
| "//src/lib/fxl", |
| "//zircon/system/ulib/hid-parser", |
| ] |
| } |
| |
| executable("input_reader_unittests") { |
| testonly = true |
| |
| sources = [ |
| "buttons_test.cc", |
| "keyboard_test.cc", |
| "mouse_test.cc", |
| "sensor_test.cc", |
| "stylus_test.cc", |
| "touchpad_test.cc", |
| "touchscreen_test.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/gtest", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/ui/lib/input_reader", |
| "//zircon/public/lib/hid", |
| "//zircon/system/ulib/hid-parser", |
| ] |
| |
| # TODO(46730): Fix the leaks and remove this. |
| deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| } |