Expanded testing for joystick actions.
Currently, only a single button on one joystick model
is tested in CTS. Here we expand the testing to include
additional KeyEvents and MotionEvents for Asus Gamepad
as well as the Sony DualShock 4. The eventual goal
is to add testing for all buttons and sticks for all
joysticks for which we have key layouts, thus allowing
us to ensure that a certain joystick model is supported
by all Android devices.
Rename the resource and the test files to follow a "company_model"
convention, so that multiple joystick models by the same company will
be shown next to each other (in alphabetic order).
Also, add an input library for cts tests. It will contain useful code
that may be utilized by different CTS test modules. Currently, it only
contains HidDevice for a simpler interface to use /dev/uhid.
It could also be used for testing shortcuts, for example (if it emulates
a keyboard instead of a joystick).
Since the "KEYCODE_" prefix being optional in ag/4031155 is not in aosp
yet, add another temporary workaround here.
Add another temporary workaround SystemClock.sleep(500). Without this,
the test is currently flaking. Even though we are sure to only write the
events after UHID_OPEN has been received (and after device added
callback from input manager has been received), monitoring "getevent
-lt" during the test execution reveals that no events are actually
emitted from the virtual device in the case where the test fails. This
suggests that UHID_OPEN callback is not sufficient to ensure that
writing reports to /dev/uhid is safe.
Note: this is a cherry-pick of ag/2983529 with an additional
cherry-pick of ag/3800049
Test: atest AsusGamepadTestCase SonyDualshock4TestCase
Bug: 36069459
Bug: 111431828
Bug: 110270125
Change-Id: If0606b61feea9d4c293874d4c851b7611fbe2a9e
Merged-In: If0606b61feea9d4c293874d4c851b7611fbe2a9e
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 5f3e99f..38077f0 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -2,11 +2,13 @@
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
-fw apps/CtsVerifier/src/com/android/cts/verifier/usb/
apps/CtsVerifierUSBCompanion/
+ libs/
tests/autofillservice/
tests/tests/animation/
+ tests/tests/graphics/
+ tests/tests/hardware/
tests/tests/print/
tests/tests/text/
- tests/tests/graphics/
tests/tests/transition/
tests/tests/uirendering/
tests/tests/view/