[pypy-svn] r75446 - in pypy/branch/sys-prefix: lib/pypy1.2/lib-python lib/pypy1.2/lib_pypy/distributed lib/pypy1.2/lib_pypy/distributed/test lib/pypy1.2/lib_pypy/pypy_test/ctypes_tests pypy pypy/module/test_lib_pypy/ctypes_tests pypy/module/test_lib_pypy/test_distributed

antocuni at codespeak.net antocuni at codespeak.net
Fri Jun 18 13:21:07 CEST 2010


Author: antocuni
Date: Fri Jun 18 13:21:05 2010
New Revision: 75446

Added:
   pypy/branch/sys-prefix/lib/pypy1.2/lib_pypy/distributed/README.tests
   pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/
      - copied from r75431, pypy/branch/sys-prefix/lib/pypy1.2/lib_pypy/pypy_test/ctypes_tests/
   pypy/branch/sys-prefix/pypy/module/test_lib_pypy/test_distributed/
      - copied from r75431, pypy/branch/sys-prefix/lib/pypy1.2/lib_pypy/distributed/test/
Removed:
   pypy/branch/sys-prefix/lib/pypy1.2/lib_pypy/distributed/test/
   pypy/branch/sys-prefix/lib/pypy1.2/lib_pypy/pypy_test/ctypes_tests/
Modified:
   pypy/branch/sys-prefix/lib/pypy1.2/lib-python/conftest.py
   pypy/branch/sys-prefix/pypy/conftest.py
   pypy/branch/sys-prefix/pypy/test_all.py
Log:
move distributed/test and ctypes_test into module/test_lib_pypy, as they are
meant to be run at applevel



Modified: pypy/branch/sys-prefix/lib/pypy1.2/lib-python/conftest.py
==============================================================================
--- pypy/branch/sys-prefix/lib/pypy1.2/lib-python/conftest.py	(original)
+++ pypy/branch/sys-prefix/lib/pypy1.2/lib-python/conftest.py	Fri Jun 18 13:21:05 2010
@@ -20,8 +20,8 @@
                                       regrtestdir, modregrtestdir, testresultdir
 
 pytest_plugins = "resultlog",
-rsyncdirs = ['.', '../pypy']
-    
+rsyncdirs = ['.', '../../../pypy/']
+
 # 
 # Interfacing/Integrating with py.test's collection process 
 #

Added: pypy/branch/sys-prefix/lib/pypy1.2/lib_pypy/distributed/README.tests
==============================================================================
--- (empty file)
+++ pypy/branch/sys-prefix/lib/pypy1.2/lib_pypy/distributed/README.tests	Fri Jun 18 13:21:05 2010
@@ -0,0 +1,2 @@
+Tests for distributed are app-level tests, so they are kept under
+pypy/module/test_lib_pypy/

Modified: pypy/branch/sys-prefix/pypy/conftest.py
==============================================================================
--- pypy/branch/sys-prefix/pypy/conftest.py	(original)
+++ pypy/branch/sys-prefix/pypy/conftest.py	Fri Jun 18 13:21:05 2010
@@ -218,8 +218,10 @@
 
     def accept_regular_test(self):
         if option.runappdirect:
-            # only collect regular tests if we are in an 'app_test' directory
-            return "app_test" in self.listnames()
+            # only collect regular tests if we are in an 'app_test' directory,
+            # or in test_lib_pypy
+            names = self.listnames()
+            return "app_test" in names or "test_lib_pypy" in names
         else:
             return True
 
@@ -230,7 +232,7 @@
             return True
         return False
 
-    def classnamefilter(self, name): 
+    def classnamefilter(self, name):
         if name.startswith('Test'):
             return self.accept_regular_test()
         if name.startswith('AppTest'):

Modified: pypy/branch/sys-prefix/pypy/test_all.py
==============================================================================
--- pypy/branch/sys-prefix/pypy/test_all.py	(original)
+++ pypy/branch/sys-prefix/pypy/test_all.py	Fri Jun 18 13:21:05 2010
@@ -13,9 +13,12 @@
     However, now lib-python is under lib/pypy1.2/lib-python.  We cannot just
     change buildbot, as it would break all the other current branches, so
     instead we replace lib-python with the correct path here.
+
+    Note: instead of passing lib/pypy1.2/lib-python, but pass lib/pyyp1.2/ as
+    an argument: this way, the tests under lib_pypy are also run.
     """
     import sys
-    from pypy.tool.lib_pypy import LIB_PYTHON
+    from pypy.tool.lib_pypy import LIB_ROOT
     if sys.argv and sys.argv[-1].endswith('lib-python'):
         libpython = py.path.local(sys.argv[-1])
         if libpython.check(dir=True):
@@ -24,7 +27,7 @@
             return
         else:
             # patch it with the correct path
-            sys.argv[-1] = str(LIB_PYTHON)
+            sys.argv[-1] = str(LIB_ROOT)
 
     
 if __name__ == '__main__':



More information about the Pypy-commit mailing list