Skip to main content
ALT Linux Bugzilla
– Attachment 21812 Details for
Bug 59720
Просьба включить поддержку libssc
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч для отключения ssc тестов на устройстве без ssc
0001-Skip-SSC-light-and-compass-tests-when-SSC-service-un.patch (text/plain), 2.16 KB, created by
Vasiliy Doylov
on 2026-07-03 15:18:08 MSK
(
hide
)
Description:
Патч для отключения ssc тестов на устройстве без ssc
Filename:
MIME Type:
Creator:
Vasiliy Doylov
Created:
2026-07-03 15:18:08 MSK
Size:
2.16 KB
patch
obsolete
>From 18e509e1a21aee866ccc9a4b84267d94a68ed570 Mon Sep 17 00:00:00 2001 >From: Vasiliy Doylov <neko@altlinux.org> >Date: Fri, 3 Jul 2026 15:03:17 +0300 >Subject: [PATCH] Skip SSC light and compass tests when SSC service unavailable > >Add has_ssc_service() check that probes QRTR for Qualcomm SSC service >via libssc. Tests are skipped when no hardware is present (e.g. on x86), >but will run on actual Qualcomm hardware where the service is available. >--- > tests/ssc-test.py | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > >diff --git a/tests/ssc-test.py b/tests/ssc-test.py >index 74e5ba0..75baab9 100755 >--- a/tests/ssc-test.py >+++ b/tests/ssc-test.py >@@ -45,6 +45,29 @@ except ImportError: > sys.exit(1) > > >+def has_ssc_service(): >+ """Check if Qualcomm SSC service is available via QRTR.""" >+ try: >+ import ctypes >+ lib = ctypes.util.find_library('ssc') >+ if not lib: >+ return False >+ ssc = ctypes.CDLL(lib) >+ func = ssc.ssc_sensor_compass_new_sync >+ func.restype = ctypes.c_void_p >+ func.argtypes = [ctypes.c_void_p, ctypes.c_void_p] >+ sensor = func(None, None) >+ if sensor: >+ close = ssc.ssc_sensor_compass_close_sync >+ close.restype = ctypes.c_int >+ close.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p] >+ close(sensor, None, None) >+ return True >+ return False >+ except Exception: >+ return False >+ >+ > SP = 'net.hadess.SensorProxy' > SP_PATH = '/net/hadess/SensorProxy' > SP_COMPASS = 'net.hadess.SensorProxy.Compass' >@@ -312,6 +335,7 @@ class Tests(dbusmock.DBusTestCase): > > self.stop_daemon() > >+ @unittest.skipIf(not has_ssc_service(), 'SSC service not available via QRTR') > def test_ssc_light(self): > '''SSC light''' > prox = self.testbed.add_device('misc', 'ssc-light', None, >@@ -336,6 +360,7 @@ class Tests(dbusmock.DBusTestCase): > > self.stop_daemon() > >+ @unittest.skipIf(not has_ssc_service(), 'SSC service not available via QRTR') > def test_ssc_compass(self): > '''SSC compass''' > prox = self.testbed.add_device('misc', 'ssc-compass', None, >-- >2.50.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 59720
: 21812