From 530e6856a9345c87def7147be4d727aec26ec2fa Mon Sep 17 00:00:00 2001 From: Juha Vuolle Date: Wed, 2 Jun 2021 14:24:35 +0300 Subject: Fix tst_qsensor autotestcase to pass on android device The main issue with running the autotests on an Android device is that the device has real sensors too and the test case is not prepared for that. This commit addresses this by allowing additional available sensors as well as specifying more specifically which sensor IDs to use for testing. Task-number: QTBUG-73617 Task-number: QTBUG-92513 Change-Id: I92180df6f5e8361d39134567616b21a3a51b636c Reviewed-by: Qt CI Bot Reviewed-by: Alex Blasche Reviewed-by: Karsten Heimrich --- tests/auto/qsensor/test_backends.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/qsensor/test_backends.h') diff --git a/tests/auto/qsensor/test_backends.h b/tests/auto/qsensor/test_backends.h index aba0b2f2..11dbe102 100644 --- a/tests/auto/qsensor/test_backends.h +++ b/tests/auto/qsensor/test_backends.h @@ -145,6 +145,7 @@ PREPARE_SENSORINTERFACE(QTiltSensor, QTiltReading, QTiltFilter, { #define TEST_SENSORINTERFACE(SensorClass, ReadingClass, readingcode)\ do {\ SensorClass sensor;\ + sensor.setIdentifier(#SensorClass); \ SensorClass ## _testfilter filter;\ sensor.addFilter(&filter);\ sensor.start();\ -- cgit v1.2.3