tests: make tests work in Fedora 18
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 18 Feb 2013 14:47:58 +0000 (16:47 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 18 Feb 2013 14:49:45 +0000 (16:49 +0200)
The tests create many temporary files and run FIEMAP on them. However, in
Fedora 18 the '/tmp' is tmpfs which does not support FIEMAP, so 'nosetests'
fails. Let's use the current directory for the tests instead.

Change-Id: I2cc2d402fd15517e043e38188d3046876a11cbec
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
tests/test_api_base.py
tests/test_fiemap.py

index c0f8df7..fd3ff96 100644 (file)
@@ -263,9 +263,10 @@ class TestCreateCopy(unittest.TestCase):
 
         # Delete all the test-related temporary files automatically
         delete = True
-        # Create all the test-related temporary files in the default directory
-        # (usually /tmp).
-        directory = None
+        # Create all the test-related temporary files in current directory (the
+        # default "/tmp" will not work in case of tmpfs which does not support
+        # FIEMAP).
+        directory = '.'
 
         iterator = tests.helpers.generate_test_files(delete = delete,
                                                      directory = directory)
index eb013f9..4429ab0 100644 (file)
@@ -104,9 +104,10 @@ class TestCreateCopy(unittest.TestCase):
 
         # Delete all the test-related temporary files automatically
         delete = True
-        # Create all the test-related temporary files in the default directory
-        # (usually /tmp).
-        directory = None
+        # Create all the test-related temporary files in current directory (the
+        # default "/tmp" will not work in case of tmpfs which does not support
+        # FIEMAP).
+        directory = '.'
         # Maximum size of the random files used in this test
         max_size = 16 * 1024 * 1024