[arch-commits] Commit in iio-sensor-proxy/trunk (PKGBUILD fix-tests.patch)

Antonio Rojas arojas at gemini.archlinux.org
Sun Mar 13 19:46:08 UTC 2022


    Date: Sunday, March 13, 2022 @ 19:46:07
  Author: arojas
Revision: 1151322

Update to 3.3

Added:
  iio-sensor-proxy/trunk/fix-tests.patch
Modified:
  iio-sensor-proxy/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   14 +++++++++++---
 fix-tests.patch |   41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-03-13 19:45:41 UTC (rev 1151321)
+++ PKGBUILD	2022-03-13 19:46:07 UTC (rev 1151322)
@@ -5,7 +5,7 @@
 # Contributor: Pablo Lezeta <prflr88 at gmail.com>
 
 pkgname=iio-sensor-proxy
-pkgver=3.1
+pkgver=3.3
 pkgrel=1
 pkgdesc='IIO accelerometer sensor to input device proxy'
 arch=('x86_64')
@@ -14,9 +14,17 @@
 depends=('systemd' 'libgudev' 'gtk3')
 makedepends=('meson')
 checkdepends=('python-gobject' 'python-dbusmock' 'python-psutil' 'umockdev')
-source=("$url/-/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('cd5891db3929dc1487c3da7d64ba62d4106c09889ba73a100fe4b5cda15470e00ece71a61042a6bdd1f9896a78a8460acff5bcd8fc794401aa1013481cf47fb1')
+source=("$url/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
+         fix-tests.patch)
+sha512sums=('f5c5e60e888be54ace4f0f2bb941fccce21b122c0755050f91aebe8dfa9e2c126e6de57dd80873ea7148fc2dfc087b23823f29d73a223c68d531502d06438ee3'
+            'b53673ad43b10eddfe484d894fa2e0e36e8ea45b34e1fc3dc8f85c92fa7c075fcbf28552f31d8976a32c8ce07b9f5ae9746dce7daffabc4130231f3719a3663d')
 
+prepare() {
+  cd $pkgname-$pkgver
+# Make tests work with C locale
+  patch -p1 -i ../fix-tests.patch
+}
+
 build() {
   mkdir $pkgname-$pkgver/build
   cd $pkgname-$pkgver/build

Added: fix-tests.patch
===================================================================
--- fix-tests.patch	                        (rev 0)
+++ fix-tests.patch	2022-03-13 19:46:07 UTC (rev 1151322)
@@ -0,0 +1,41 @@
+diff --git a/tests/integration-test.py b/tests/integration-test.py
+index b03e6b9..a3905d2 100755
+--- a/tests/integration-test
++++ b/tests/integration-test
+@@ -592,7 +592,6 @@ class Tests(dbusmock.DBusTestCase):
+             []
+         )
+         env = os.environ.copy()
+-        env['LC_NUMERIC'] = 'fr_FR.UTF-8'
+         self.start_daemon(env=env)
+ 
+         self.assertEqual(self.get_dbus_property('HasAccelerometer'), True)
+@@ -601,9 +600,8 @@ class Tests(dbusmock.DBusTestCase):
+             mock_file.write(data)
+         self.proxy.ClaimAccelerometer()
+         self.assertEventually(lambda: self.have_text_in_log('Accel sent by driver'))
+-        # If the 2nd test fails, it's likely that fr_FR.UTF-8 locale isn't supported
+-        self.assertEqual(self.have_text_in_log('scale: 0,000000,0,000000,0,000000'), False)
+-        self.assertEqual(self.have_text_in_log('scale: 0,000010,0,000010,0,000010'), True)
++        self.assertEqual(self.have_text_in_log('scale: 0.000000,0.000000,0.000000'), False)
++        self.assertEqual(self.have_text_in_log('scale: 0.000010,0.000010,0.000010'), True)
+ 
+         self.stop_daemon()
+ 
+@@ -659,14 +657,12 @@ class Tests(dbusmock.DBusTestCase):
+              'IIO_SENSOR_PROXY_TYPE', 'iio-poll-accel']
+         )
+         env = os.environ.copy()
+-        env['LC_NUMERIC'] = 'fr_FR.UTF-8'
+         self.start_daemon(env=env)
+ 
+         self.proxy.ClaimAccelerometer()
+         self.assertEventually(lambda: self.have_text_in_log('Accel read from IIO on'))
+-        # If the 2nd test fails, it's likely that fr_FR.UTF-8 locale isn't supported
+-        self.assertEqual(self.have_text_in_log('scale 1,000000,1,000000,1,000000'), False)
+-        self.assertEqual(self.have_text_in_log('scale 0,000001,0,000001,0,000001'), True)
++        self.assertEqual(self.have_text_in_log('scale 1.000000,1.000000,1.000000'), False)
++        self.assertEqual(self.have_text_in_log('scale 0.000001,0.000001,0.000001'), True)
+ 
+         self.assertEventually(lambda: self.get_dbus_property('AccelerometerOrientation') == 'normal')
+ 



More information about the arch-commits mailing list