Просмотр исходного кода

CTS: add --rrp-bindaddr to enable rrp tests.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2758 fd59a12c-fef9-0310-b244-a6a79926bd2f
Angus Salkeld 16 лет назад
Родитель
Сommit
d312db330f
2 измененных файлов с 24 добавлено и 16 удалено
  1. 6 0
      cts/corolab.py
  2. 18 16
      cts/corotests.py

+ 6 - 0
cts/corolab.py

@@ -70,6 +70,7 @@ def usage(arg):
     print "\t [--nodes 'node list'],     list of cluster nodes separated by whitespace" 
     print "\t [--limit-nodes max],       only use the first 'max' cluster nodes supplied with --nodes" 
     print "\t [--logfile path],          where should the test software look for logs from cluster nodes" 
+    print "\t [--rrp-bindaddr addr],       extra interface used for rrp, provide the bindaddr" 
     print "\t [--outputfile path],       optional location for the test software to write logs to" 
     print "\t [--syslog-facility name],  which syslog facility should the test software log to" 
     print "\t [--choose testcase-name],  run only the named test" 
@@ -111,6 +112,7 @@ class CoroLabEnvironment(CtsLab):
         self["DoBSC"]    = 0
         self["use_logd"] = 0
         self["oprofile"] = []
+        self["RrpBindAddr"] = None
         self["warn-inactive"] = 0
         self["ListTests"] = 0
         self["benchmark"] = 0
@@ -179,6 +181,10 @@ if __name__ == '__main__':
            skipthis=1
            Environment["OutputFile"] = args[i+1]
 
+       elif args[i] == "--rrp-bindaddr":
+           skipthis=1
+           Environment["RrpBindAddr"] = args[i+1]
+
        elif args[i] == "--oprofile":
            skipthis=1
            Environment["oprofile"] = args[i+1].split(' ')

+ 18 - 16
cts/corotests.py

@@ -926,22 +926,24 @@ def CoroTestList(cm, audits):
     #f['quorum/provider'] = 'corosync_quorum_ykd'
     #configs.append(f)
 
-
-    g = {}
-    g['totem/rrp_mode'] = 'passive'
-    g['totem/interface[2]/ringnumber'] = '1'
-    g['totem/interface[2]/bindnetaddr'] = '192.168.200.0'
-    g['totem/interface[2]/mcastaddr'] = '226.94.1.2'
-    g['totem/interface[2]/mcastport'] = '5405'
-    configs.append(g)
-
-    h = {}
-    h['totem/rrp_mode'] = 'active'
-    h['totem/interface[2]/ringnumber'] = '1'
-    h['totem/interface[2]/bindnetaddr'] = '192.168.200.0'
-    h['totem/interface[2]/mcastaddr'] = '226.94.1.2'
-    h['totem/interface[2]/mcastport'] = '5405'
-    configs.append(h)
+    if not cm.Env["RrpBindAddr"] is None:
+        g = {}
+        g['totem/rrp_mode'] = 'passive'
+        g['totem/interface[2]/ringnumber'] = '1'
+        g['totem/interface[2]/bindnetaddr'] = cm.Env["RrpBindAddr"]
+        g['totem/interface[2]/mcastaddr'] = '226.94.1.2'
+        g['totem/interface[2]/mcastport'] = '5405'
+        configs.append(g)
+
+        h = {}
+        h['totem/rrp_mode'] = 'active'
+        h['totem/interface[2]/ringnumber'] = '1'
+        h['totem/interface[2]/bindnetaddr'] = cm.Env["RrpBindAddr"]
+        h['totem/interface[2]/mcastaddr'] = '226.94.1.2'
+        h['totem/interface[2]/mcastport'] = '5405'
+        configs.append(h)
+    else:
+        print 'Not including rrp tests. Use --rrp-binaddr to enable them.'
 
     num=1
     for cfg in configs: