Loading libs/input/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ cc_library { shared_libs: [ "libutils", "libbinder", "libui", ], static_libs: [ Loading libs/input/tests/Android.bp +5 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ package { cc_test { name: "libinput_tests", host_supported: true, srcs: [ "IdGenerator_test.cpp", "InputChannel_test.cpp", Loading @@ -24,6 +25,7 @@ cc_test { static_libs: [ "libgui_window_info_static", "libinput", "libui-types", ], cflags: [ "-Wall", Loading @@ -35,11 +37,13 @@ cc_test { "libbinder", "libcutils", "liblog", "libui", "libutils", "libvintf", ], data: ["data/*"], test_options: { unit_test: true, }, test_suites: ["device-tests"], } Loading @@ -60,7 +64,6 @@ cc_library_static { "libcutils", "libutils", "libbinder", "libui", "libbase", ], } libs/input/tests/InputDevice_test.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ protected: } void SetUp() override { #if !defined(__ANDROID__) GTEST_SKIP() << "b/253299089 Generic files are currently read directly from device."; #endif loadKeyLayout("Generic"); loadKeyCharacterMap("Generic"); } Loading Loading @@ -131,6 +134,9 @@ TEST_F(InputDeviceKeyMapTest, keyCharacteMapApplyMultipleOverlaysTest) { } TEST(InputDeviceKeyLayoutTest, DoesNotLoadWhenRequiredKernelConfigIsMissing) { #if !defined(__ANDROID__) GTEST_SKIP() << "Can't check kernel configs on host"; #endif std::string klPath = base::GetExecutableDirectory() + "/data/kl_with_required_fake_config.kl"; base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(klPath); ASSERT_FALSE(ret.ok()) << "Should not be able to load KeyLayout at " << klPath; Loading @@ -139,6 +145,9 @@ TEST(InputDeviceKeyLayoutTest, DoesNotLoadWhenRequiredKernelConfigIsMissing) { } TEST(InputDeviceKeyLayoutTest, LoadsWhenRequiredKernelConfigIsPresent) { #if !defined(__ANDROID__) GTEST_SKIP() << "Can't check kernel configs on host"; #endif std::string klPath = base::GetExecutableDirectory() + "/data/kl_with_required_real_config.kl"; base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(klPath); ASSERT_TRUE(ret.ok()) << "Cannot load KeyLayout at " << klPath; Loading Loading
libs/input/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ cc_library { shared_libs: [ "libutils", "libbinder", "libui", ], static_libs: [ Loading
libs/input/tests/Android.bp +5 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ package { cc_test { name: "libinput_tests", host_supported: true, srcs: [ "IdGenerator_test.cpp", "InputChannel_test.cpp", Loading @@ -24,6 +25,7 @@ cc_test { static_libs: [ "libgui_window_info_static", "libinput", "libui-types", ], cflags: [ "-Wall", Loading @@ -35,11 +37,13 @@ cc_test { "libbinder", "libcutils", "liblog", "libui", "libutils", "libvintf", ], data: ["data/*"], test_options: { unit_test: true, }, test_suites: ["device-tests"], } Loading @@ -60,7 +64,6 @@ cc_library_static { "libcutils", "libutils", "libbinder", "libui", "libbase", ], }
libs/input/tests/InputDevice_test.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ protected: } void SetUp() override { #if !defined(__ANDROID__) GTEST_SKIP() << "b/253299089 Generic files are currently read directly from device."; #endif loadKeyLayout("Generic"); loadKeyCharacterMap("Generic"); } Loading Loading @@ -131,6 +134,9 @@ TEST_F(InputDeviceKeyMapTest, keyCharacteMapApplyMultipleOverlaysTest) { } TEST(InputDeviceKeyLayoutTest, DoesNotLoadWhenRequiredKernelConfigIsMissing) { #if !defined(__ANDROID__) GTEST_SKIP() << "Can't check kernel configs on host"; #endif std::string klPath = base::GetExecutableDirectory() + "/data/kl_with_required_fake_config.kl"; base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(klPath); ASSERT_FALSE(ret.ok()) << "Should not be able to load KeyLayout at " << klPath; Loading @@ -139,6 +145,9 @@ TEST(InputDeviceKeyLayoutTest, DoesNotLoadWhenRequiredKernelConfigIsMissing) { } TEST(InputDeviceKeyLayoutTest, LoadsWhenRequiredKernelConfigIsPresent) { #if !defined(__ANDROID__) GTEST_SKIP() << "Can't check kernel configs on host"; #endif std::string klPath = base::GetExecutableDirectory() + "/data/kl_with_required_real_config.kl"; base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(klPath); ASSERT_TRUE(ret.ok()) << "Cannot load KeyLayout at " << klPath; Loading