fix tests by moving commonly used test helper file to a new test support directory
authorStefan Behnel <stefan_ml@behnel.de>
Sun, 8 Jul 2012 16:19:40 +0000 (18:19 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Sun, 8 Jul 2012 16:19:40 +0000 (18:19 +0200)
--HG--
rename : tests/memoryview/cythonarrayutil.pxi => tests/testsupport/cythonarrayutil.pxi

runtests.py
tests/testsupport/cythonarrayutil.pxi [moved from tests/memoryview/cythonarrayutil.pxi with 100% similarity]

index 81a23d8..4bff0e2 100644 (file)
@@ -223,6 +223,7 @@ COMPILER = None
 INCLUDE_DIRS = [ d for d in os.getenv('INCLUDE', '').split(os.pathsep) if d ]
 CFLAGS = os.getenv('CFLAGS', '').split()
 CCACHE = os.getenv('CYTHON_RUNTESTS_CCACHE', '').split()
+TEST_SUPPORT_DIR = 'testsupport'
 
 BACKENDS = ['c', 'cpp']
 
@@ -329,7 +330,7 @@ class TestBuilder(object):
         filenames.sort()
         for filename in filenames:
             path = os.path.join(self.rootdir, filename)
-            if os.path.isdir(path):
+            if os.path.isdir(path) and filename != TEST_SUPPORT_DIR:
                 if filename == 'pyregr' and not self.with_pyregr:
                     continue
                 if filename == 'broken' and not self.test_bugs:
@@ -566,7 +567,7 @@ class CythonCompileTestCase(unittest.TestCase):
 
     def run_cython(self, test_directory, module, targetdir, incdir, annotate,
                    extra_compile_options=None):
-        include_dirs = INCLUDE_DIRS[:]
+        include_dirs = INCLUDE_DIRS + [os.path.join(test_directory, '..', TEST_SUPPORT_DIR)]
         if incdir:
             include_dirs.append(incdir)
         source = self.find_module_source_file(