mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
tests: Remove pam-wrapper temporary folder on test completion
PAM wrapper creates /tmp/pam.X files during its execution (strictly as it does not follow $TMPDIR either), however given the low number of combinations, we may end up in re-using the same pam.* folder during meson test, causing a failure. As per this, remove these temporary files on tearDown so that we won't try reusing the same folder multiple times.
This commit is contained in:
@ -18,7 +18,9 @@ import subprocess
|
||||
import dbus
|
||||
import dbusmock
|
||||
import fcntl
|
||||
import glob
|
||||
import os
|
||||
import shutil
|
||||
import time
|
||||
import pypamtest
|
||||
|
||||
@ -68,6 +70,9 @@ class TestPamFprintd(dbusmock.DBusTestCase):
|
||||
def tearDownClass(klass):
|
||||
klass.stop_monitor()
|
||||
|
||||
# Remove pam wrapper files, as they may break other tests
|
||||
[shutil.rmtree(i) for i in glob.glob('/tmp/pam.[0-9A-z]')]
|
||||
|
||||
def setUp(self):
|
||||
(self.p_mock, self.obj_fprintd_manager) = self.spawn_server_template(
|
||||
self.template_name, {}, stdout=subprocess.PIPE)
|
||||
|
||||
Reference in New Issue
Block a user