[pypy-svn] r76916 - in pypy/build/bot2/pypybuildbot: . test

antocuni at codespeak.net antocuni at codespeak.net
Tue Sep 7 14:24:34 CEST 2010


Author: antocuni
Date: Tue Sep  7 14:24:33 2010
New Revision: 76916

Modified:
   pypy/build/bot2/pypybuildbot/master.py
   pypy/build/bot2/pypybuildbot/test/test_pypylist.py
Log:
rename the builder pypy-c-app-level-win-32 to pypy-c-app-level-win-x86-32 in
order to have a consistent naming scheme (in particular with
pypy-c-jit-win-x86-32).  Moreover, add a test for PyPyTarball to check that
the returned builder names actually exist.



Modified: pypy/build/bot2/pypybuildbot/master.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/master.py	(original)
+++ pypy/build/bot2/pypybuildbot/master.py	Tue Sep  7 14:24:33 2010
@@ -159,11 +159,12 @@
 LINUX32 = "own-linux-x86-32"
 LINUX64 = "own-linux-x86-64"
 MACOSX32 =  "own-macosx-x86-32"
+#WIN32 = "own-win-x86-32"
 APPLVLLINUX32 = "pypy-c-app-level-linux-x86-32"
 APPLVLLINUX64 = "pypy-c-app-level-linux-64"
 STACKLESSAPPLVLLINUX32 = "pypy-c-stackless-app-level-linux-x86-32"
 
-APPLVLWIN32 = "pypy-c-app-level-win-32"
+APPLVLWIN32 = "pypy-c-app-level-win-x86-32"
 STACKLESSAPPLVLFREEBSD64 = 'pypy-c-stackless-app-level-freebsd-7-x86-64'
 
 JITLINUX32 = "pypy-c-jit-linux-x86-32"

Modified: pypy/build/bot2/pypybuildbot/test/test_pypylist.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/test/test_pypylist.py	(original)
+++ pypy/build/bot2/pypybuildbot/test/test_pypylist.py	Tue Sep  7 14:24:33 2010
@@ -1,3 +1,4 @@
+import py
 from pypybuildbot.pypylist import PyPyTarball
 
 def test_pypytarball():
@@ -41,27 +42,52 @@
         'pypy-c-stackless-10000-linux.tar.bz2',
         ]
 
+def load_BuildmasterConfig():
+    import os
+    from pypybuildbot import summary, builds
+    def load(name):
+        if name == 'pypybuildbot.summary':
+            return summary
+        elif name == 'pypybuildbot.builds':
+            return builds
+        else:
+            assert False
+    
+    this = py.path.local(__file__)
+    master_py = this.dirpath().dirpath().join('master.py')
+    glob = {'httpPortNumber': 80,
+            'slavePortnum': 1234,
+            'passwords': {},
+            'load': load,
+            'os': os}
+    execfile(str(master_py), glob)
+    return glob['BuildmasterConfig']
+
 def test_builder_names():
+    BuildmasterConfig = load_BuildmasterConfig()
+    builders = [b['name'] for b in BuildmasterConfig['builders']]
+    known_exceptions = set(['own-win-x86-32'])
+    def check_builder_names(t, expected_own, expected_app):
+        own, app = t.get_builder_names()
+        assert own == expected_own
+        assert app == expected_app
+        assert own in builders or own in known_exceptions
+        assert app in builders or app in known_exceptions
+    
     t = PyPyTarball('pypy-c-jit-76867-linux.tar.bz2')
-    assert t.get_builder_names() == ('own-linux-x86-32',
-                                     'pypy-c-jit-linux-x86-32')
+    check_builder_names(t, 'own-linux-x86-32', 'pypy-c-jit-linux-x86-32')
 
     t = PyPyTarball('pypy-c-nojit-76867-linux.tar.bz2')
-    assert t.get_builder_names() == ('own-linux-x86-32',
-                                     'pypy-c-app-level-linux-x86-32')
+    check_builder_names(t, 'own-linux-x86-32', 'pypy-c-app-level-linux-x86-32')
     
     t = PyPyTarball('pypy-c-stackless-76867-linux.tar.bz2')
-    assert t.get_builder_names() == ('own-linux-x86-32',
-                                     'pypy-c-stackless-app-level-linux-x86-32')
+    check_builder_names(t, 'own-linux-x86-32', 'pypy-c-stackless-app-level-linux-x86-32')
 
     t = PyPyTarball('pypy-c-jit-76867-osx.tar.bz2')
-    assert t.get_builder_names() == ('own-macosx-x86-32',
-                                     'pypy-c-jit-macosx-x86-32')
+    check_builder_names(t, 'own-macosx-x86-32', 'pypy-c-jit-macosx-x86-32')
 
     t = PyPyTarball('pypy-c-jit-76867-linux64.tar.bz2')
-    assert t.get_builder_names() == ('own-linux-x86-64',
-                                     'pypy-c-jit-linux-x86-64')
+    check_builder_names(t, 'own-linux-x86-64', 'pypy-c-jit-linux-x86-64')
 
     t = PyPyTarball('pypy-c-jit-76867-win32.tar.bz2')
-    assert t.get_builder_names() == ('own-win-x86-32',
-                                     'pypy-c-jit-win-x86-32')
+    check_builder_names(t, 'own-win-x86-32', 'pypy-c-jit-win-x86-32')



More information about the Pypy-commit mailing list