attempt to support testing on centos5 again
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 3 Feb 2010 06:20:37 +0000 (06:20 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 3 Feb 2010 06:20:37 +0000 (06:20 +0000)
system/LocalTestResources.sample.inria
system/LocalTestResources.sample.princeton
system/TestPlc.py
system/TestResources.py

index c8d8b1f..5683087 100644 (file)
@@ -1,4 +1,4 @@
-#
+# -*-python-*-
 # $Id$
 # 
 # this is only an example file
@@ -28,19 +28,18 @@ class OnelabTestResources (TestResources):
                    '138.96.255.%d'%(230+i), 
                    '02:34:56:00:00:%02d'%i) for i in range(1,10) ]
     
-    def qemus_ip_pool (self):
-        return [ ( 'testqemu%d.onelab.eu'%i, None, None) for i in range(1,4) ]
+    # 64-bits qemu boxes that can run any test
+    def qemus_ip_pool_64 (self):
+        return [ ( 'testqemu%d.onelab.eu'%i, None, None) for i in range(1,4) ] 
 
-    def max_qemus (self):
-        return 3
+    # 32-bits qemu boxes that can run only 32bits nodes
+    def qemus_ip_pool_32 (self):
+        return [ ( 'testqemu32-%d.onelab.eu'%i, None, 32) for i in range(1,6) ]
 
     def plcs_ip_pool (self):
         return [  ( 'vplc%02d.inria.fr'%i, 
                     '138.96.255.%d'%(200+i), 
                     '02:34:56:00:ee:%02d'%i) for i in range(1,16) ]
 
-    def max_plcs (self):
-        return 12
-
 
 local_resources = OnelabTestResources ()
index cbd08f5..26c79fe 100644 (file)
@@ -1,4 +1,4 @@
-#
+# -*-python-*-
 # $Id$
 # 
 # this is only an example file
@@ -28,11 +28,10 @@ class OnelabTestResources (TestResources):
                  ("node-02.test.planet-lab.org", "128.112.139.66", "de:ad:be:ef:00:20"),
                  ]
     
-    def qemus_ip_pool (self):
+    def qemus_ip_pool_64 (self):
         return [  ( 'testqemu1.test.planet-lab.org', None, None ) ]
-
-    def max_qemus (self):
-        return 1
+    def qemus_ip_pool_32 (self):
+        return [ ]
 
     def plcs_ip_pool (self):
         return [ ("plc-01.test.planet-lab.org","128.112.139.34", "de:ad:be:ef:ff:01"),
@@ -42,8 +41,4 @@ class OnelabTestResources (TestResources):
                  ("plc-05.test.planet-lab.org","128.112.139.41", "de:ad:be:ef:ff:05"),
                  ]
 
-    def max_plcs (self):
-        return 4
-
-
 local_resources = OnelabTestResources ()
index f5e9b57..745f658 100644 (file)
@@ -469,6 +469,12 @@ class TestPlc:
     ### install_rpm 
     def install(self):
         "yum install myplc, noderepo, and the plain bootstrapfs"
+
+        # workaround for getting pgsql5.2 on centos5
+        if self.options.fcdistro == "centos5":
+            self.run_in_guest("rpm -Uvh http://yum.pgsqlrpms.org/8.2/pgdg-centos-8.2-4.noarch.rpm")
+            self.run_in_guest("rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm")
+
         if self.options.personality == "linux32":
             arch = "i386"
         elif self.options.personality == "linux64":
index 0041404..53dee4f 100644 (file)
@@ -37,6 +37,13 @@ class TestResources:
             sys.exit(1)
         return plcs
 
+    def qemus_ip_pool(self):
+        return self.qemus_ip_pool_64()
+    def max_qemus(self):
+        return len(self.qemus_ip_pool())
+    def max_plcs(self):
+        return len(self.plcs_ip_pool())
+
     def localize_qemus (self,plcs,options):
 
         # all plcs on the same vserver box
@@ -173,13 +180,13 @@ class TestResources:
 
     ###
     def trplc_record (self,plc):
-        tracker = TrackerPlc(plc.options,instances=self.max_plcs())
+        tracker = TrackerPlc(plc.options,instances=self.max_plcs()-1)
         tracker.record(plc.test_ssh.hostname,plc.vservername)
         tracker.store()
         return True
 
     def trplc_free (self,plc):
-        tracker = TrackerPlc(plc.options,instances=self.max_plcs())
+        tracker = TrackerPlc(plc.options,instances=self.max_plcs()-1)
         tracker.free()
         tracker.store()
         return True
@@ -194,7 +201,7 @@ class TestResources:
         return True
 
     def trplc_cleanup (self,plc):
-        tracker = TrackerPlc(plc.options,instances=self.max_plcs())
+        tracker = TrackerPlc(plc.options,instances=self.max_plcs()-1)
         tracker.cleanup()
         tracker.store()
         return True
@@ -204,7 +211,7 @@ class TestResources:
         return True
 
     def trplc_list (self,plc):
-        TrackerPlc(plc.options,instances=self.max_plcs()).list()
+        TrackerPlc(plc.options,instances=self.max_plcs()-1).list()
         return True
 
     def localize_rspec (self,plcs,options):