fix for compat mode
[tests.git] / system / LocalTestResources.sample.inria
old mode 100644 (file)
new mode 100755 (executable)
index 630f299..8eaad0f
@@ -1,10 +1,14 @@
+#!/usr/bin/python
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA 
 #
-# $Id$
-# 
 # this is only an example file
 # the actual file is installed in your testmaster box as /root/LocalTestResources.py
 # 
-# 
+
+if __name__ == '__main__':
+   import sys, os.path
+   sys.path.append(os.path.expanduser("~/git-tests/system"))
 
 from TestResources import TestResources
 
@@ -29,12 +33,20 @@ class OnelabTestResources (TestResources):
                    '02:34:56:00:00:%02d'%i) for i in range(1,8) ]
     
     # 32bits : qemu32-[1-5] + 64bits : qemu64-[1-3]
+    # removing qemu64-3 until it gets on the right IP segment again
     def qemus_ip_pool (self):
-        return [ ( 'qemu64-%d.pl.sophia.inria.fr'%i, None, None) for i in range(1,4) ] + \
-               [ ( 'qemu32-%d.pl.sophia.inria.fr'%i, None, None) for i in range(1,6) ]
+        return [
+            ('kvm64-1.pl.sophia.inria.fr', None, None),
+            ('kvm64-2.pl.sophia.inria.fr', None, None),
+            ('kvm64-3.pl.sophia.inria.fr', None, None),
+            ('kvm64-4.pl.sophia.inria.fr', None, None),
+            ('kvm64-5.pl.sophia.inria.fr', None, None),
+            ('kvm64-6.pl.sophia.inria.fr', None, None),
+            ]
 
     def max_qemus (self):
-        return len(self.qemus_ip_pool())-2
+       # let's be tight; nighlty builds.sh wipes it clean beforehand
+        return len(self.qemus_ip_pool())
 
     # 1 to 15
     def plcs_ip_pool (self):
@@ -43,6 +55,13 @@ class OnelabTestResources (TestResources):
                     '02:34:56:00:ee:%02d'%i) for i in range(1,16) ]
 
     def max_plcs (self):
-        return len(self.plcs_ip_pool())-2
+       # leave space for the triangle setups
+        return len(self.plcs_ip_pool())-3
+
+    def preferred_hostname (self):
+        return None
 
 local_resources = OnelabTestResources ()
+
+if __name__ == '__main__':
+   for (h,_,__) in local_resources.qemus_ip_pool(): print h