summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2013-09-20 11:57:01 -0500
committerMartin Pitt <martinpitt@gnome.org>2013-09-20 11:58:18 -0500
commit960d4413f93c1974166b55b15e8489f61e4485b6 (patch)
tree95c0d78b4eae39ac460afb93d54cb926a87719bc
parentee0a71dd7ded70af8e243e9853db0b4ba7c9508a (diff)
Linux integration tests: Run tests under umockdev-wrapper
Don't just cover the test upowerd by umockdev-wrapper, but the test suite itself as well, so that we can send uevents. Do this by re-execing the test suite under umockdev-wrapper if it's not already running under it.
-rwxr-xr-xsrc/linux/integration-test6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/linux/integration-test b/src/linux/integration-test
index 73e9ee8..47773da 100755
--- a/src/linux/integration-test
+++ b/src/linux/integration-test
@@ -122,7 +122,7 @@ class Tests(unittest.TestCase):
# have to do that ourselves
env['UMOCKDEV_DIR'] = self.testbed.get_root_dir()
self.log = tempfile.NamedTemporaryFile()
- self.daemon = subprocess.Popen(['umockdev-wrapper', self.daemon_path, '-v'],
+ self.daemon = subprocess.Popen([self.daemon_path, '-v'],
env=env, stdout=self.log, stderr=subprocess.STDOUT)
# wait until the daemon gets online
@@ -673,4 +673,8 @@ class Tests(unittest.TestCase):
return prop_str
if __name__ == '__main__':
+ # run ourselves under umockdev
+ if 'umockdev' not in os.environ.get('LD_PRELOAD', ''):
+ os.execvp('umockdev-wrapper', ['umockdev-wrapper'] + sys.argv)
+
unittest.main()