Blame SOURCES/0002-integration-test-Do-not-copy-config-files-when-testi.patch

b28802
From 6e4fdd7d353b9171d164dcee2ec434a1b55c7e27 Mon Sep 17 00:00:00 2001
b28802
From: Tomas Bzatek <tbzatek@redhat.com>
b28802
Date: Fri, 14 Jun 2019 16:36:34 +0200
b28802
Subject: [PATCH 2/2] integration-test: Do not copy config files when testing
b28802
 system instance
b28802
b28802
---
b28802
 src/tests/integration-test | 15 +++++++--------
b28802
 1 file changed, 7 insertions(+), 8 deletions(-)
b28802
b28802
diff --git a/src/tests/integration-test b/src/tests/integration-test
b28802
index 2bc78a2b..4652a8c2 100755
b28802
--- a/src/tests/integration-test
b28802
+++ b/src/tests/integration-test
b28802
@@ -129,6 +129,13 @@ class UDisksTestCase(unittest.TestCase):
b28802
         if (os.access(cls.daemon_path, os.X_OK)):
b28802
             print('Testing binaries from local build tree')
b28802
             cls.check_build_tree_config()
b28802
+            # copy required system files
b28802
+            testdir = os.path.abspath(os.path.dirname(__file__))
b28802
+            projdir = os.path.abspath(os.path.normpath(os.path.join(testdir, '..', '..')))
b28802
+            tmpdir = tempfile.mkdtemp(prefix='udisks-tst-')
b28802
+            atexit.register(shutil.rmtree, tmpdir)
b28802
+            files_to_restore = install_config_files(projdir, tmpdir)
b28802
+            atexit.register(restore_files, files_to_restore, tmpdir)
b28802
         else:
b28802
             print('Testing installed system binaries')
b28802
             cls.daemon_path = None
b28802
@@ -1899,14 +1906,6 @@ if __name__ == '__main__':
b28802
                            help='name of test class or method (e. g. "Drive", "FS.test_ext2")')
b28802
     cli_args = argparser.parse_args()
b28802
 
b28802
-    testdir = os.path.abspath(os.path.dirname(__file__))
b28802
-    projdir = os.path.abspath(os.path.normpath(os.path.join(testdir, '..', '..')))
b28802
-    tmpdir = tempfile.mkdtemp(prefix='udisks-tst-')
b28802
-    atexit.register(shutil.rmtree, tmpdir)
b28802
-
b28802
-    files_to_restore = install_config_files(projdir, tmpdir)
b28802
-    atexit.register(restore_files, files_to_restore, tmpdir)
b28802
-
b28802
     UDisksTestCase.init(logfile=cli_args.logfile)
b28802
     if cli_args.testname:
b28802
         tests = unittest.TestLoader().loadTestsFromNames(
b28802
-- 
b28802
2.21.0
b28802