summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2023-02-27 13:41:04 +0100
committerBastien Nocera <hadess@hadess.net>2023-02-27 14:12:39 +0100
commit3bf5a095ac477e4f1cc4cabc92ae2761564dffe1 (patch)
tree07f212b396bebd2fb6345b96a0ca7d2f7fdcac75
parentb2cbf0109004d5ad4b76c146f5ed1b03bb8568d7 (diff)
downloadupower-3bf5a095ac477e4f1cc4cabc92ae2761564dffe1.tar.gz
linux: Fix device paths in tests
add_device() doesn't need the full sysfs path if there's a parent, otherwise this section of the path will be duplicated.
-rwxr-xr-xsrc/linux/integration-test.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py
index 4b3d90d..49416b5 100755
--- a/src/linux/integration-test.py
+++ b/src/linux/integration-test.py
@@ -1628,18 +1628,18 @@ class Tests(dbusmock.DBusTestCase):
None,
[], [])
parent = self.testbed.add_device('hid',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009',
+ '0003:046D:C52B.0009',
parent,
[], [])
dev = self.testbed.add_device('hid',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009/0003:046D:4101.000A',
+ '0003:046D:4101.000A',
parent,
[], [])
parent = dev
batt_dev = self.testbed.add_device(
'power_supply',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009/0003:046D:4101.000A/power_supply/hidpp_battery_3',
+ 'power_supply/hidpp_battery_3',
parent,
['type', 'Battery',
'scope', 'Device',
@@ -1669,7 +1669,7 @@ class Tests(dbusmock.DBusTestCase):
self.testbed.add_device(
'input',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009/0003:046D:4101.000A/input/input22',
+ 'input/input22',
parent,
[], ['DEVNAME', 'input/mouse3', 'ID_INPUT_TOUCHPAD', '1', 'ID_INPUT_MOUSE', '1'])
self.testbed.uevent(batt_dev, 'change')
@@ -1685,24 +1685,24 @@ class Tests(dbusmock.DBusTestCase):
None,
[], [])
parent = self.testbed.add_device('hid',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009',
+ '0003:046D:C52B.0009',
parent,
[], [])
dev = self.testbed.add_device('hid',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009/0003:046D:4101.000A',
+ '0003:046D:4101.000A',
parent,
[], [])
parent = dev
self.testbed.add_device(
'input',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009/0003:046D:4101.000A/input/input22',
+ 'input/input22',
parent,
[], ['DEVNAME', 'input/mouse3', 'ID_INPUT_TOUCHPAD', '1', 'ID_INPUT_MOUSE', '1'])
dev = self.testbed.add_device(
'power_supply',
- '/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0009/0003:046D:4101.000A/power_supply/hidpp_battery_3',
+ 'power_supply/hidpp_battery_3',
parent,
['type', 'Battery',
'scope', 'Device',