mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-04 10:38:49 +02:00
tests: Skip permissions tests if chattr falis
This commit is contained in:
parent
ef60667578
commit
a2e418b87f
1 changed files with 4 additions and 1 deletions
|
|
@ -322,7 +322,10 @@ class Tests(dbusmock.DBusTestCase):
|
|||
if not GLib.find_program_in_path("chattr"):
|
||||
self.skipTest("chattr is not found")
|
||||
|
||||
subprocess.check_output(["chattr", f"{attr}i", fname])
|
||||
try:
|
||||
subprocess.check_output(["chattr", f"{attr}i", fname])
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.skipTest(f"chattr is not supported: {e.output}")
|
||||
if not enable:
|
||||
os.chmod(fname, 0o666)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue