From 929b57c3d8c5792edc7fc692d5847950623f3be5 Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Mon, 6 Jun 2011 11:18:08 +0200
Subject: [PATCH] add parameters test_suite_title and test_node_title

---
 slapos/recipe/erp5testnode/__init__.py | 3 ++-
 slapos/recipe/erp5testnode/testnode.py | 8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/slapos/recipe/erp5testnode/__init__.py b/slapos/recipe/erp5testnode/__init__.py
index 3ee6bb858..c48df631f 100644
--- a/slapos/recipe/erp5testnode/__init__.py
+++ b/slapos/recipe/erp5testnode/__init__.py
@@ -87,8 +87,9 @@ class Recipe(BaseSlapRecipe):
               node_quantity=self.parameter_dict.get('node_quantity', '1'),
               test_suite_master_url=self.parameter_dict.get(
                                 'test_suite_master_url', None),
-              test_suite_name=self.parameter_dict.get('test_suite_name'),
+              test_suite=self.parameter_dict.get('test_suite'),
               test_suite_title=self.parameter_dict.get('test_suite_title'),
+              test_node_title=self.parameter_dict.get('test_node_title'),
               project_title=self.parameter_dict.get('project_title'),
               bin_directory=self.bin_directory,
               # botenvironemnt is splittable string of key=value to substitute
diff --git a/slapos/recipe/erp5testnode/testnode.py b/slapos/recipe/erp5testnode/testnode.py
index 3bcdf8491..1564ea8e5 100644
--- a/slapos/recipe/erp5testnode/testnode.py
+++ b/slapos/recipe/erp5testnode/testnode.py
@@ -101,6 +101,7 @@ branch = %(branch)s
   custom_profile.close()
   config['repository_path'] = repository_path
   sys.path.append(repository_path)
+  test_suite_title = config['test_suite_title'] or config['test_suite']
 
   retry_software = False
   try:
@@ -152,7 +153,8 @@ branch = %(branch)s
           assert master.getProtocolRevision() == 1
           test_result = safeRpcCall(master.createTestResult,
             config['test_suite_name'], revision, [],
-            False, config['test_suite_title'], config['project_title'])
+            False, config['test_suite'],
+            config['test_node_title'], config['project_title'])
         print "testnode, test_result : %r" % (test_result,)
         if test_result:
           test_result_path, test_revision = test_result
@@ -176,7 +178,7 @@ branch = %(branch)s
             )
           if status_dict['status_code'] != 0:
             safeRpcCall(master.reportTaskFailure,
-              test_result_path, status_dict, config['test_suite_title'])
+              test_result_path, status_dict, test_suite_title)
             retry_software = True
             continue
 
@@ -220,7 +222,7 @@ branch = %(branch)s
           if line[:2] == '#!':
             invocation_list = line[2:].split()
           invocation_list.extend([run_test_suite_path,
-                                  '--test_suite', config['test_suite_name'],
+                                  '--test_suite', config['test_suite'],
                                   '--revision', revision,
                                   '--node_quantity', config['node_quantity'],
                                   '--master_url', config['test_suite_master_url']])
-- 
2.30.9